Enable use of shortcuts like pytest.importorskip and other tricks
which can cause test to skip itself.
(cherry picked from commit
b8829c801f876b58e0ac1ce354e6790ef8de4532)
In addition to
b8829c801f876b58e0ac1ce354e6790ef8de4532,
"R:$systest:SKIPPED" is not being printed when pytests are skipped
because that leads to two `R:` lines - SKIPPED and PASS/FAIL which is
determined later based on other conditions (core files identified,
assertion failures, shell test result, ...) - which is wrong and
testsummary.sh rightfully stumbles on it:
I:Found 106 test results, but 105 tests were run
rm -f "$systest/$test.status"
if start_servers; then
run=$((run+1))
- rm -f "$systest/$test.status"
test_status=0
(cd "$systest" && "$PYTEST" -v "$test" "$@" || echo "$?" > "$test.status") | SYSTESTDIR="$systest" cat_d
if [ -f "$systest/$test.status" ]; then
- echo_i "FAILED"
- test_status=$(cat "$systest/$test.status")
+ if [ "$(cat "$systest/$test.status")" != "5" ]; then
+ test_status=$(cat "$systest/$test.status")
+ fi
fi
status=$((status+test_status))
stop_servers || status=1
else
status=1
+ fi
+ if [ $status -ne 0 ]; then
break
fi
done