summaryrefslogtreecommitdiffstats
path: root/meta-python/recipes-devtools/python/python3-betamax/run-ptest
diff options
context:
space:
mode:
authorGyorgy Sarvari <skandigraun@gmail.com>2025-10-19 17:59:26 +0200
committerGyorgy Sarvari <skandigraun@gmail.com>2025-10-20 11:59:36 +0200
commitb476f98381af7e7b369e788fffee817d4e4ebb45 (patch)
tree1c61af4d1993adf6c1affa3abdd946c93542806f /meta-python/recipes-devtools/python/python3-betamax/run-ptest
parent975abfa25971b08d2296db65ddeeea87d566de53 (diff)
downloadmeta-openembedded-b476f98381af7e7b369e788fffee817d4e4ebb45.tar.gz
python3-betamax: fix ptests
1. Some tests require internet access. Set a DNS for that, if it is not available at the start of the test. 2. Added a backported patch that fixes some failing tests, due to a variable header value contained in a response. (fix-failing-ptest.patch) 3. Added a backported patch that avoids calling pytest fixtures directly. If not applied, tests calling them are marked as failing by pytest. (fix-direct-calls-to-test-fixtures.patch) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-betamax/run-ptest')
-rw-r--r--meta-python/recipes-devtools/python/python3-betamax/run-ptest6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python3-betamax/run-ptest b/meta-python/recipes-devtools/python/python3-betamax/run-ptest
index b63c4de0d9..7553a6d4bc 100644
--- a/meta-python/recipes-devtools/python/python3-betamax/run-ptest
+++ b/meta-python/recipes-devtools/python/python3-betamax/run-ptest
@@ -1,3 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2 2
3if ! nslookup httpbin.org >/dev/null 2>&1 ; then
4 trap 'mv /etc/resolv.conf.bak /etc/resolv.conf' INT EXIT
5 mv /etc/resolv.conf /etc/resolv.conf.bak
6 echo "nameserver 8.8.8.8" > /etc/resolv.conf
7fi
8
3pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}' 9pytest -o log_cli=true -o log_cli_level=INFO | sed -e 's/\[...%\]//g'| sed -e 's/PASSED/PASS/g'| sed -e 's/FAILED/FAIL/g'|sed -e 's/SKIPPED/SKIP/g'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS"){printf "%s: %s\n", $NF, $0}else{print}}'| awk '{if ($NF=="PASS" || $NF=="FAIL" || $NF=="SKIP" || $NF=="XFAIL" || $NF=="XPASS") {$NF="";print $0}else{print}}'