Commit da351e2a authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis
Browse files

burnin: Fix a bug when generated tests fail

When a generated test was failing (in particular the
GeneratedServerTestSuite) burnin couldn't know that this test failed
and wasn't exiting with an error exit status.

Fix this by forcing the test that generated the erroneous test suite to
parent caf3366e
......@@ -194,6 +194,7 @@ class BurninTests(unittest.TestCase):
flavors = None
delete_stale = False
temp_directory = None
failfast = None
quotas = Proper(value=None)
......@@ -570,6 +571,7 @@ def initialize(opts, testsuites, stale_testsuites):
BurninTests.images = opts.images
BurninTests.delete_stale = opts.delete_stale
BurninTests.temp_directory = opts.temp_directory
BurninTests.failfast = opts.failfast
BurninTests.run_id = SNF_TEST_PREFIX + \
datetime.datetime.strftime(curr_time, "%Y%m%d%H%M%S")
......@@ -341,6 +341,10 @@ class ServerTestSuite(BurninTests):
def test_004_run_testsuites(self):
"""Run the generated tests"""
success = True
for gen_cls in self.gen_classes:"Running testsuite %s", gen_cls.__name__)
success = run_test(gen_cls) and success # With this order
if self.failfast and not success:
self.assertTrue(success, "Some of the generated tests failed")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment