From 0321178a367aee8a97b41285a4f3aa1a3de7533e Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Fri, 14 Feb 2025 18:27:35 +0100 Subject: [PATCH] Distinguish timeouts etc by their expected state --- nix/rustc-tests.nix | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/nix/rustc-tests.nix b/nix/rustc-tests.nix index e5f58890..fe822e02 100644 --- a/nix/rustc-tests.nix +++ b/nix/rustc-tests.nix @@ -114,14 +114,6 @@ let || [[ "$FILE" == "test-results/parser/issues/auxiliary/issue-21146-inc.rs" ]]\ ; then result="⊘ unsupported-build-settings" - elif [ $status -eq 124 ]; then - result="❌ timeout" - elif [ $status -eq 101 ] || [ $status -eq 255 ]; then - if grep -q 'fatal runtime error: stack overflow' "$FILE.charon-output"; then - result="❌ stack overflow" - else - result="❌ panic" - fi elif grep -q 'error.E0601' "$FILE.charon-output"; then # That's the "`main` not found" error we get on auxiliary files. result="⊘ unsupported-build-settings" @@ -136,6 +128,14 @@ let fi if [ $status -eq 0 ]; then got="success" + elif [ $status -eq 124 ]; then + got="timeout" + elif [ $status -eq 101 ] || [ $status -eq 255 ]; then + if grep -q 'fatal runtime error: stack overflow' "$FILE.charon-output"; then + got="stack overflow" + else + got="panic" + fi else got="failure" if grep -q 'error.E9999' "$FILE.charon-output"; then @@ -156,11 +156,16 @@ let extras="" if [[ $expected == "success" ]]; then if [ -e "$FILE.llbc" ]; then - extras="with llbc output" + if ! [[ $got == "success" ]]; then + # If we have a failure and an llbc file, the failure happened while serializing. + got="$got while serializing" + else + extras="with llbc output and " + fi if grep -q 'The extraction generated .* warnings' "$FILE.charon-output"; then - extras="$extras and warnings" + extras="$extras""warnings" else - extras="$extras and no warnings" + extras="$extras""no warnings" fi else extras="without llbc output"