Skip to content

Commit

Permalink
Improvement done in execution exit code to consider when execution cr…
Browse files Browse the repository at this point in the history
…ashed
  • Loading branch information
anibalinn committed Aug 30, 2024
1 parent 5091808 commit d271c1c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions behavex/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,13 @@ def launch_behavex():
failures_file.write(parameters)
# Calculates final exit code. execution_codes is 1 only if an execution exception arises
if isinstance(execution_codes, list):
execution_exception = True if sum(execution_codes) > 0 else False
execution_failed = True if sum(execution_codes) > 0 else False
execution_interrupted_or_crashed = True if any([code == 2 for code in execution_codes]) else False
else:
execution_exception = True if execution_codes > 0 else False
execution_failed = True if execution_codes > 0 else False
execution_interrupted_or_crashed = True if execution_codes == 2 else False
exit_code = (
EXIT_ERROR if execution_exception or failing_non_muted_tests else EXIT_OK
EXIT_ERROR if (execution_failed and failing_non_muted_tests) or execution_interrupted_or_crashed else EXIT_OK
)
except KeyboardInterrupt:
print('Caught KeyboardInterrupt, terminating workers')
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setup(
name='behavex',
version='4.0.1rc14',
version='4.0.1rc15',
license="MIT",
platforms=['any'],
python_requires='>=3.5',
Expand Down

0 comments on commit d271c1c

Please sign in to comment.