Skip to content

Commit

Permalink
Categorize tests better
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadrieril committed Apr 19, 2024
1 parent 4919108 commit a0ecbe1
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,29 @@
status=$?
if [ $status -eq 124 ]; then
result=timeout
elif [ $status -eq 101 ]; then
elif [ $status -eq 101 ] && ! grep -q '^// known-bug:' "$FILE"; then
result=panic
elif [ $status -eq 0 ]; then
result=success
# Only keep the informative outputs.
rm "$FILE.charon-output"
elif [ -f ${"$"}{FILE%.rs}.stderr ]; then
# This is a test that should fail
result=expected-failure
# Only keep the informative outputs.
rm "$FILE.charon-output"
elif grep -q '^// aux-build' "$FILE" \
|| grep -q '^// compile-flags:' "$FILE" \
|| grep -q '^// revisions:' "$FILE" \
|| grep -q '^// known-bug:' "$FILE" \
|| grep -q '^// edition:' "$FILE"; then
# We can't handle these for now
result=unsupported-build-settings
else
result=failure
fi
# Only keep the informative outputs.
if [[ $result != "panic" ]] && [[ $result != "failure" ]]; then
rm "$FILE.charon-output"
fi
echo $result
'';
run_ui_tests = pkgs.writeScript "charon-analyze-test-file" ''
Expand Down

0 comments on commit a0ecbe1

Please sign in to comment.