Skip to content

Commit

Permalink
check if tests are failing (#221)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pilzington authored Oct 12, 2023
1 parent 8a5d55d commit 2f26823
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: test
test:
python -m pip install mock
for file in $(shell find . -name test -type d); do python -m unittest discover -v -p '*_test.py' -s $$(dirname $$file); done
python3 -m pip install mock
./test.sh

.PHONY: test-local
test-local:
Expand Down
14 changes: 14 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
failed=0

for file in $(find . -name test -type d); do
echo "Running tests in $(dirname $file)"
python -m unittest discover -v -p '*_test.py' -s $(dirname $file) || failed=1
done

if [ $failed -eq 0 ]; then
echo "All tests passed."
else
echo "One or more tests have failed."
exit 1
fi

0 comments on commit 2f26823

Please sign in to comment.