Revision 980c2592 snf-tools/synnefo_tools/burnin.py
b/snf-tools/synnefo_tools/burnin.py | ||
---|---|---|
1661 | 1661 |
fail.write(str(res[0].shortDescription()) + '\n') |
1662 | 1662 |
fail.write('\n') |
1663 | 1663 |
if not NOFAILFAST: |
1664 |
sys.exit() |
|
1664 |
sys.exit(1)
|
|
1665 | 1665 |
|
1666 | 1666 |
if (len(result.failures) == 0) and (len(result.errors) == 0): |
1667 | 1667 |
log.debug("Passed testcase: %s" % msg) |
... | ... | |
1677 | 1677 |
def _run_cases_in_series(cases, image_folder): |
1678 | 1678 |
"""Run instances of TestCase in series""" |
1679 | 1679 |
|
1680 |
error_found = False |
|
1681 |
|
|
1680 | 1682 |
for case in cases: |
1681 | 1683 |
|
1682 | 1684 |
test = case.__name__ |
... | ... | |
1709 | 1711 |
error.write(str(res[0]) + '\n') |
1710 | 1712 |
error.write(str(res[0].shortDescription()) + '\n') |
1711 | 1713 |
error.write('\n') |
1714 |
error_found = True |
|
1712 | 1715 |
|
1713 | 1716 |
for res in result.failures: |
1714 | 1717 |
log.error("snf-burnin failed in testcase: %s" % test) |
... | ... | |
1716 | 1719 |
fail.write(str(res[0]) + '\n') |
1717 | 1720 |
fail.write(str(res[0].shortDescription()) + '\n') |
1718 | 1721 |
fail.write('\n') |
1722 |
error_found = True |
|
1719 | 1723 |
if not NOFAILFAST: |
1720 |
sys.exit() |
|
1724 |
sys.exit(1)
|
|
1721 | 1725 |
|
1722 | 1726 |
if (len(result.failures) == 0) and (len(result.errors) == 0): |
1723 | 1727 |
log.debug("Passed testcase: %s" % test) |
1724 | 1728 |
|
1729 |
# Return |
|
1730 |
if error_found: |
|
1731 |
return 1 |
|
1732 |
else: |
|
1733 |
return 0 |
|
1734 |
|
|
1725 | 1735 |
|
1726 | 1736 |
def _run_cases_in_parallel(cases, fanout, image_folder): |
1727 | 1737 |
"""Run instances of TestCase in parallel, in a number of distinct processes |
Also available in: Unified diff