mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-03 03:19:23 +00:00
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>
10 lines
611 B
Bash
10 lines
611 B
Bash
#!/bin/sh
|
|
|
|
if ! nslookup httpbin.org >/dev/null 2>&1 ; then
|
|
trap 'mv /etc/resolv.conf.bak /etc/resolv.conf' INT EXIT
|
|
mv /etc/resolv.conf /etc/resolv.conf.bak
|
|
echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
|
fi
|
|
|
|
pytest -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}}'
|