Skip to content

Commit

Permalink
check for panic exit status directly
Browse files Browse the repository at this point in the history
Since rust-lang/rust#52197, ICEs will fail with exit status 101.
Compilation successes and failures will return 0 and 1, respectively.

Fixes rust-lang#143.
  • Loading branch information
euclio committed Oct 11, 2018
1 parent 4ac3ddb commit 8f9781f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ for f in src/*
do
[[ -f $f ]] || continue;
echo "Testing $f:"
# Compile the code, and if it passes exit with error code
if rustc "$f" > /dev/null 2>&1; then
# Compile the code, and if it exits without a panic, exit with error code
rustc "$f" > /dev/null 2>&1
if [ "$?" == 101 ]; then
exit 1
fi
done
Expand Down

0 comments on commit 8f9781f

Please sign in to comment.