Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
synnefo
Commits
7a9a079f
Commit
7a9a079f
authored
Sep 16, 2013
by
Ilias Tsitsimpis
Committed by
Christos Stavrakakis
Sep 24, 2013
Browse files
snf-burnin: Change exit code to 1 for errors
When burnin test cases fail, return 1 as exit code.
parent
83cd9dff
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-tools/synnefo_tools/burnin.py
View file @
7a9a079f
...
...
@@ -1661,7 +1661,7 @@ class TestRunnerProcess(Process):
fail.write(str(res[0].shortDescription()) + '
\n
')
fail.write('
\n
')
if not NOFAILFAST:
sys.exit()
sys.exit(
1
)
if (len(result.failures) == 0) and (len(result.errors) == 0):
log.debug("Passed testcase: %s" % msg)
...
...
@@ -1677,6 +1677,8 @@ class TestRunnerProcess(Process):
def _run_cases_in_series(cases, image_folder):
"""
Run
instances
of
TestCase
in
series
"""
error_found = False
for case in cases:
test = case.__name__
...
...
@@ -1709,6 +1711,7 @@ def _run_cases_in_series(cases, image_folder):
error.write(str(res[0]) + '
\n
')
error.write(str(res[0].shortDescription()) + '
\n
')
error.write('
\n
')
error_found = True
for res in result.failures:
log.error("snf-burnin failed in testcase: %s" % test)
...
...
@@ -1716,12 +1719,19 @@ def _run_cases_in_series(cases, image_folder):
fail.write(str(res[0]) + '
\n
')
fail.write(str(res[0].shortDescription()) + '
\n
')
fail.write('
\n
')
error_found = True
if not NOFAILFAST:
sys.exit()
sys.exit(
1
)
if (len(result.failures) == 0) and (len(result.errors) == 0):
log.debug("Passed testcase: %s" % test)
# Return
if error_found:
return 1
else:
return 0
def _run_cases_in_parallel(cases, fanout, image_folder):
"""
Run
instances
of
TestCase
in
parallel
,
in
a
number
of
distinct
processes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment