Exit build.sh with an error if one of the exercise examples fails the test run

This commit is contained in:
Erik Simmler 2016-03-13 21:06:49 -04:00
parent 153caf22f2
commit 791b4ab6c7
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -5,7 +5,7 @@
"license": "BSD3",
"source-directories": [
".",
"./exercises/hello_world",
"./exercises/hello-world",
"./exercises/leap",
"./exercises/bob"
],