Skip to content

Commit

Permalink
Ensure tox fails at first pytest failure
Browse files Browse the repository at this point in the history
**Why?**

At the moment, pytest failures were ignored due to a change in the Makefile
used to execute tests. The ADF CI GitHub Workflow would result in a
success, even when a test case failed.

**What?**

Fixed by exiting on the first failure using Makefile foreach instead.
  • Loading branch information
sbkok committed May 16, 2024
1 parent 6478778 commit 8c0bcd5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Makefile.tox
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ all: test lint

test:
# Run unit tests
( \
for config in $(TEST_CONFIGS); do \
pytest $$(dirname $$config) -vvv -s -c $$config; \
done \
@ $(foreach config,$(TEST_CONFIGS), \
pytest $$(dirname $(config)) -vvv -s -c $(config) || exit 1; \
)

lint:
Expand Down

0 comments on commit 8c0bcd5

Please sign in to comment.