mirror of
https://github.com/correl/elm.git
synced 2025-03-10 17:00:07 -09:00
Exit build.sh with an error if one of the exercise examples fails the test run
This commit is contained in:
parent
153caf22f2
commit
791b4ab6c7
2 changed files with 7 additions and 1 deletions
|
@ -7,6 +7,12 @@ do
|
||||||
echo '-------------------------------------------------------'
|
echo '-------------------------------------------------------'
|
||||||
echo "Testing $exercise"
|
echo "Testing $exercise"
|
||||||
elm-test $exercise_dir/*Tests.elm
|
elm-test $exercise_dir/*Tests.elm
|
||||||
|
TEST_RESULT=$?
|
||||||
mv "$exercise_dir/$exercise.elm" "$exercise_dir/$exercise.example"
|
mv "$exercise_dir/$exercise.elm" "$exercise_dir/$exercise.example"
|
||||||
mv "$exercise_dir/$exercise.impl" "$exercise_dir/$exercise.elm"
|
mv "$exercise_dir/$exercise.impl" "$exercise_dir/$exercise.elm"
|
||||||
|
|
||||||
|
if [ $TEST_RESULT -ne 0 ]; then
|
||||||
|
echo "$exercise failed";
|
||||||
|
exit $TEST_RESULT;
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"license": "BSD3",
|
"license": "BSD3",
|
||||||
"source-directories": [
|
"source-directories": [
|
||||||
".",
|
".",
|
||||||
"./exercises/hello_world",
|
"./exercises/hello-world",
|
||||||
"./exercises/leap",
|
"./exercises/leap",
|
||||||
"./exercises/bob"
|
"./exercises/bob"
|
||||||
],
|
],
|
||||||
|
|
Loading…
Add table
Reference in a new issue