From 791b4ab6c79bb45b7732658fefa3881f25b03a14 Mon Sep 17 00:00:00 2001 From: Erik Simmler Date: Sun, 13 Mar 2016 21:06:49 -0400 Subject: [PATCH] Exit build.sh with an error if one of the exercise examples fails the test run --- bin/build.sh | 6 ++++++ elm-package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/build.sh b/bin/build.sh index 3ec5410..5bea25b 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -7,6 +7,12 @@ do echo '-------------------------------------------------------' echo "Testing $exercise" elm-test $exercise_dir/*Tests.elm + TEST_RESULT=$? mv "$exercise_dir/$exercise.elm" "$exercise_dir/$exercise.example" mv "$exercise_dir/$exercise.impl" "$exercise_dir/$exercise.elm" + + if [ $TEST_RESULT -ne 0 ]; then + echo "$exercise failed"; + exit $TEST_RESULT; + fi done diff --git a/elm-package.json b/elm-package.json index 7d7ab00..47757a4 100644 --- a/elm-package.json +++ b/elm-package.json @@ -5,7 +5,7 @@ "license": "BSD3", "source-directories": [ ".", - "./exercises/hello_world", + "./exercises/hello-world", "./exercises/leap", "./exercises/bob" ],