Skip to content
Snippets Groups Projects
Commit 3c218901 authored by jonny's avatar jonny
Browse files

readd pipefail

parent 0de11b89
Branches
No related tags found
No related merge requests found
Pipeline #13293 canceled
...@@ -26,7 +26,7 @@ run-test: ...@@ -26,7 +26,7 @@ run-test:
script: script:
- chmod 777 -R ./test - chmod 777 -R ./test
- cd ./test - cd ./test
- ./test/run-tests.sh - ./run-tests.sh
artifacts: artifacts:
expire_in: 7 days expire_in: 7 days
when: always when: always
......
...@@ -3,6 +3,8 @@ TEST_FOLDERS=$(ls -d */) ...@@ -3,6 +3,8 @@ TEST_FOLDERS=$(ls -d */)
FAILED=0 FAILED=0
set -euo pipefail
if ! command -v jq &> /dev/null if ! command -v jq &> /dev/null
then then
apt-get update apt-get update
...@@ -15,7 +17,7 @@ do ...@@ -15,7 +17,7 @@ do
if [ "$dir" != "test-output" ]; then if [ "$dir" != "test-output" ]; then
echo "running for $dir" echo "running for $dir"
EXPECTED=$(jq . "./${dir}/output.json") EXPECTED=$(jq . "./${dir}/output.json")
ACTUAL=$(cd .. && stack run -- walint --repository ./test/${dir} --config-file ./config.json --json --pretty | jq && cd test) ACTUAL=$(cd .. && stack run -- walint --repository ./test/${dir} --config-file ./config.json --json --pretty | jq && cd test) || true
if [ "$EXPECTED" != "$ACTUAL" ]; then if [ "$EXPECTED" != "$ACTUAL" ]; then
...@@ -27,5 +29,6 @@ do ...@@ -27,5 +29,6 @@ do
fi fi
done done
echo "finished"
exit $FAILED exit $FAILED
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment