display better diff and exit whem test fails

This commit is contained in:
Thibault bui Koechlin 2020-06-08 16:48:17 +02:00
parent 5e4c3adf50
commit ae0dffcf10

View file

@ -30,4 +30,4 @@ jobs:
run: pwd && cd hub-tests && bash -x ./prep_tests.sh && cd ..
- name: Run the tests
working-directory: crowdsec-pull/tests/
run: for i in `find ./tests -mindepth 1 -maxdepth 1 -type d` ; do echo "Testing $i" ; ./main $i || exit 1 ; done
run: for i in `find ./tests -mindepth 1 -maxdepth 1 -type d` ; do echo "Testing $i" ; ./main $i || (echo "failed test for ${i}" ; diff ${i}"/results.yaml" ${i}"/results.yaml.fail") ; done