From 8f9781f9a0661f3023843939d4f235931cbf7e5a Mon Sep 17 00:00:00 2001 From: Andy Russell Date: Thu, 11 Oct 2018 10:39:33 -0400 Subject: [PATCH] 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 #143. --- test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index a2e626bc..89affc86 100755 --- a/test.sh +++ b/test.sh @@ -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