Skip to content

Commit 8f9781f

Browse files
committed
check for panic exit status directly
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.
1 parent 4ac3ddb commit 8f9781f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ for f in src/*
44
do
55
[[ -f $f ]] || continue;
66
echo "Testing $f:"
7-
# Compile the code, and if it passes exit with error code
8-
if rustc "$f" > /dev/null 2>&1; then
7+
# Compile the code, and if it exits without a panic, exit with error code
8+
rustc "$f" > /dev/null 2>&1
9+
if [ "$?" == 101 ]; then
910
exit 1
1011
fi
1112
done

0 commit comments

Comments
 (0)