From 7002e55c485921f4969e4e1a5acb7ee9ec5222be Mon Sep 17 00:00:00 2001 From: Damien Katz Date: Sat, 20 May 2017 21:37:35 -0700 Subject: [PATCH] Ensure successful cargo build before updating repl-tests Otherwise you might run old code because you forgot to compile the debug build. --- update-test-repl.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update-test-repl.sh b/update-test-repl.sh index e8e2937..31c2489 100755 --- a/update-test-repl.sh +++ b/update-test-repl.sh @@ -6,7 +6,11 @@ DIRNAME="$(dirname ${SCRIPTPATH})" NOISE="${DIRNAME}/target/debug/noise_search" REPL_TEST_DIR="${DIRNAME}/repl-tests" - +cargo build +exit_status=$? +if [ $exit_status -ne 0 ]; then + exit $exit_status +fi if [[ ! -f "${NOISE}" ]]; then echo "Can't find noise binary, looked at ${NOISE}" exit 1