From fad1a90e3caef572569b89180d25c0bfed2c0426 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Fri, 18 Dec 2015 11:28:28 +0100 Subject: [PATCH] Backed out changeset 282f22cbf7ef (bug 1229379) --- testing/talos/talos/run_tests.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/testing/talos/talos/run_tests.py b/testing/talos/talos/run_tests.py index 878dc24790ab..cc88037271fe 100755 --- a/testing/talos/talos/run_tests.py +++ b/testing/talos/talos/run_tests.py @@ -17,7 +17,7 @@ from mozlog import get_proxy_logger from talos.results import TalosResults from talos.ttest import TTest -from talos.utils import TalosError, TalosRegression +from talos.utils import TalosError, TalosCrash, TalosRegression from talos.config import get_configs, ConfigurationError # directory of this file @@ -184,36 +184,34 @@ def run_tests(config, browser_config): httpd.start() testname = None - # run the tests - timer = utils.Timer() - LOG.suite_start(tests=[test['name'] for test in tests]) try: + # run the tests + timer = utils.Timer() + LOG.info("Starting test suite %s" % title) for test in tests: testname = test['name'] - LOG.test_start(testname) + testtimer = utils.Timer() + LOG.info("Starting test %s" % testname) mytest = TTest() talos_results.add(mytest.runTest(browser_config, test)) - LOG.test_end(testname, status='OK') + LOG.info("Completed test %s (%s)" + % (testname, testtimer.elapsed())) - except TalosRegression as exc: + except TalosRegression: LOG.error("Detected a regression for %s" % testname) # by returning 1, we report an orange to buildbot # http://docs.buildbot.net/latest/developer/results.html - LOG.test_end(testname, status='FAIL', message=unicode(exc), - stack=traceback.format_exc()) return 1 - except Exception as exc: + except (TalosCrash, TalosError): # NOTE: if we get into this condition, talos has an internal # problem and cannot continue # this will prevent future tests from running - LOG.test_end(testname, status='ERROR', message=unicode(exc), - stack=traceback.format_exc()) + traceback.print_exception(*sys.exc_info()) # indicate a failure to buildbot, turn the job red return 2 finally: - LOG.suite_end() httpd.stop() LOG.info("Completed test suite (%s)" % timer.elapsed())