From e5852bd41fd734da1f0b767fa824cf158103c002 Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Wed, 28 Aug 2024 23:33:55 +0200 Subject: [PATCH] ci/vkd3d: check for tests listed in fails but not actually failing Meaning either it is not executed or passes. Catches typos, which I would've merged without this check. Part-of: --- .gitlab-ci/vkd3d-runner.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitlab-ci/vkd3d-runner.sh b/.gitlab-ci/vkd3d-runner.sh index bea8cf84ebb..0ade794d252 100755 --- a/.gitlab-ci/vkd3d-runner.sh +++ b/.gitlab-ci/vkd3d-runner.sh @@ -143,6 +143,20 @@ for failed_test in "${fails[@]}"; do printf '%s,%s\n' "$failed_test" "$test_status" done > "$RESULTSFILE" +# Catch tests listed but not executed or not failing +mapfile -t expected_fail_lines < "$EXPECTATIONFILE" +for expected_fail_line in "${expected_fail_lines[@]}"; do + test_name=$(cut -d, -f1 <<< "$expected_fail_line") + if [ ! -f "$TEST_LOGS/$test_name.log" ]; then + test_status='UnexpectedImprovement(Skip)' + elif [ ! -f "$RESULTS/$test_name.log" ]; then + test_status='UnexpectedImprovement(Pass)' + else + continue + fi + printf '%s,%s\n' "$test_name" "$test_status" +done >> "$RESULTSFILE" + mapfile -t unexpected_results < <(comm -23 "$RESULTSFILE" "$EXPECTATIONFILE") if [ ${#unexpected_results[@]} -gt 0 ]; then printf >&2 '\nUnexpected results:\n'