Skip to content

Commit

Permalink
If tests fail, return with exit code 1
Browse files Browse the repository at this point in the history
Fixes #334
  • Loading branch information
goldmann committed Dec 5, 2018
1 parent a19f8e5 commit 52c2e6f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cekit/test/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def run(self, image, run_tags, test_names):
from behave.__main__ import main as behave_main

with Chdir(os.path.join(self.target, 'test')):
behave_main(args)
if behave_main(args) != 0:
raise CekitError("Test execution failed, please consult output above")
except CekitError:
raise
except:
raise CekitError("Test execution failed, please consult output above")
raise CekitError("An error occurred while executing tests")

0 comments on commit 52c2e6f

Please sign in to comment.