Bug 1196287 - remove the useless print_logcat function. r=jmaher
authorJulien Pagès <j.parkouss@gmail.com>
Wed, 02 Sep 2015 21:32:37 +0200
changeset 1007 cbea3dea9d0c
parent 1006 18be0ccfa48d
child 1008 3fa2c76a3fb7
push id696
push userj.parkouss@gmail.com
push dateThu, 03 Sep 2015 07:45:44 +0000
reviewersjmaher
bugs1196287
Bug 1196287 - remove the useless print_logcat function. r=jmaher
talos/run_tests.py
--- a/talos/run_tests.py
+++ b/talos/run_tests.py
@@ -61,25 +61,16 @@ def buildCommandLine(test):
             url.extend(['-%s' % key, str(value)])
 
     # XXX we should actually return the list but since we abuse
     # the url as a command line flag to pass to firefox all over the place
     # will just make a string for now
     return ' '.join(url)
 
 
-def print_logcat():
-    if os.path.exists('logcat.log'):
-        with open('logcat.log') as f:
-            data = f.read()
-        for l in data.split('\r'):
-            # Buildbot will mark the job as failed if it finds 'ERROR'.
-            print l.replace('RROR', 'RR_R')
-
-
 def setup_webserver(webserver):
     """use mozhttpd to setup a webserver"""
 
     scheme = "http://"
     if (webserver.startswith('http://') or
         webserver.startswith('chrome://') or
         webserver.startswith('file:///')):  # noqa
 
@@ -152,19 +143,17 @@ def run_tests(config, browser_config):
                                     for i in browser_config['extensions']]
     browser_config['bcontroller_config'] = \
         utils.interpolate(browser_config['bcontroller_config'])
 
     # normalize browser path to work across platforms
     browser_config['browser_path'] = \
         os.path.normpath(browser_config['browser_path'])
 
-    binary = browser_config.get("apk_path")
-    if not binary:
-        binary = browser_config["browser_path"]
+    binary = browser_config["browser_path"]
     version_info = mozversion.get_version(binary=binary)
     browser_config['browser_name'] = version_info['application_name']
     browser_config['browser_version'] = version_info['application_version']
     browser_config['buildid'] = version_info['application_buildid']
     try:
         browser_config['repository'] = version_info['application_repository']
         browser_config['sourcestamp'] = version_info['application_changeset']
     except KeyError:
@@ -216,45 +205,40 @@ def run_tests(config, browser_config):
     # run the tests
     timer = utils.Timer()
     logging.info("Starting test suite %s", title)
     for test in tests:
         testname = test['name']
         testtimer = utils.Timer()
         logging.info("Starting test %s", testname)
 
-        mozfile.remove('logcat.log')
-
         try:
             mytest = TTest()
             if mytest:
                 talos_results.add(mytest.runTest(browser_config, test))
             else:
                 logging.error("Error found while running %s", testname)
         except TalosRegression:
             logging.error("Detected a regression for %s", testname)
-            print_logcat()
             if httpd:
                 httpd.stop()
             # by returning 1, we report an orange to buildbot
             # http://docs.buildbot.net/latest/developer/results.html
             return 1
         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
             traceback.print_exception(*sys.exc_info())
-            print_logcat()
             if httpd:
                 httpd.stop()
             # indicate a failure to buildbot, turn the job red
             return 2
 
         logging.info("Completed test %s (%s)", testname, testtimer.elapsed())
-        print_logcat()
 
     logging.info("Completed test suite (%s)", timer.elapsed())
 
     # stop the webserver if running
     if httpd:
         httpd.stop()
 
     # output results