From dc5acad54343741b56f0ff84aaadadad3509f6ec Mon Sep 17 00:00:00 2001 From: Tom Krizek Date: Wed, 15 Jun 2022 15:00:27 +0200 Subject: [PATCH] Report reasons for skipped/xfailed system pytests If skip/xfail is used in pytest, it can have a reason string associated with it. When evaluating these tests, it can be useful to be able to differentiate the reason why the test was skipped/xfailed/xpassed, because there might be multiple possible reasons for that. The extra options passed to pytest ensure that the string with the reason appears in the test summary and thus we're able to find the string with the reason in the log output. See https://docs.pytest.org/en/7.1.x/how-to/skipping.html for more info (cherry picked from commit f6d368167a4a12609e1b6082c445babed8449a18) --- bin/tests/system/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tests/system/run.sh b/bin/tests/system/run.sh index cef1e2ee53..14a10670fa 100755 --- a/bin/tests/system/run.sh +++ b/bin/tests/system/run.sh @@ -237,7 +237,7 @@ if [ $status -eq 0 ]; then if start_servers; then run=$((run+1)) test_status=0 - (cd "$systest" && "$PYTEST" -v "$test" "$@" || echo "$?" > "$test.status") | SYSTESTDIR="$systest" cat_d + (cd "$systest" && "$PYTEST" -rsxX -v "$test" "$@" || echo "$?" > "$test.status") | SYSTESTDIR="$systest" cat_d if [ -f "$systest/$test.status" ]; then if [ "$(cat "$systest/$test.status")" != "5" ]; then test_status=$(cat "$systest/$test.status")