Skip to content

Commit

Permalink
tests: exit code other than 0 when tests fail
Browse files Browse the repository at this point in the history
the exit code will be the number of tests that have failed
  • Loading branch information
StunxFS committed Jul 4, 2024
1 parent 0add314 commit 9acd8d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/check_invalid_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@
passed = utils.bold(utils.green(f'{ok} PASSED'))
failed = utils.bold(utils.red(f'{fail} FAILED'))
print(f"{utils.bold('Summary:')} {passed}, {failed}")
if fail > 0:
exit(fail)
2 changes: 1 addition & 1 deletion tests/invalid_code/access_modifer.out
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tests/invalid_code/access_modifer.bs:8:26: error: cannot access private constant `x`
tests/invalid_code/access_modifer.bs:14:26: error: cannot access private constant `x`

0 comments on commit 9acd8d6

Please sign in to comment.