Skip to content

Commit

Permalink
Merge pull request #564 from Nadrieril/more-precise-rustc-test-output
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril authored Feb 17, 2025
2 parents 319b2fe + 0321178 commit dd1153c
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions nix/rustc-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit dd1153c

Please sign in to comment.