Bug 1246271 - The mozharness script at least needs to accept the browsermob settings to pass it down to the test runner. r?maja_zf, r?whimboo draft
authorSyd Polk <spolk@mozilla.com>
Thu, 10 Mar 2016 10:14:22 -0600
changeset 339173 661f249defdcd0fda973ef48a4dcaa951f64f040
parent 338011 7f7f0a43f051424dbdc87db33a9947f7b87e8c89
child 515918 c24be3512e0ee2352d485616e9d136d200479d13
push id12648
push userspolk@mozilla.com
push dateThu, 10 Mar 2016 16:15:27 +0000
reviewersmaja_zf, whimboo
bugs1246271
milestone47.0a1
Bug 1246271 - The mozharness script at least needs to accept the browsermob settings to pass it down to the test runner. r?maja_zf, r?whimboo MozReview-Commit-ID: HNsV8RDpvuJ
testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py
--- a/testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py
+++ b/testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py
@@ -57,16 +57,22 @@ media_test_config_options = [
       "help": "Enable e10s when running marionette tests."
       }],
     [["--suite"],
      {"action": "store",
       "dest": "test_suite",
       "default": "media-tests",
       "help": "suite name",
       }],
+    [['--browsermob-script'],
+     {'help': 'path to the browsermob-proxy shell script or batch file',
+     }],
+    [['--browsermob-port'],
+     {'help': 'port to run the browsermob proxy on',
+     }],
 ] + (copy.deepcopy(testing_config_options))
 
 class JobResultParser(TestSummaryOutputParserHelper):
     """ Parses test output to determine overall result."""
     def __init__(self, **kwargs):
         super(JobResultParser, self).__init__(**kwargs)
         self.return_code = 0
         # External-resource errors that should not count as test failures
@@ -130,16 +136,18 @@ class FirefoxMediaTestsBase(TestingMixin
         self.test_timeout = int(c.get('test_timeout'))
         self.tests = c.get('tests')
         self.e10s = c.get('e10s')
         self.installer_url = c.get('installer_url')
         self.installer_path = c.get('installer_path')
         self.binary_path = c.get('binary_path')
         self.test_packages_url = c.get('test_packages_url')
         self.test_url = c.get('test_url')
+        self.browsermob_script = c.get('browsermob_script')
+        self.browsermob_port = c.get('browsermob_port')
 
     @PreScriptAction('create-virtualenv')
     def _pre_create_virtualenv(self, action):
         dirs = self.query_abs_dirs()
 
         media_tests_requirements = os.path.join(dirs['abs_test_install_dir'],
                                                 'config',
                                                 'external-media-tests-requirements.txt')
@@ -199,16 +207,20 @@ class FirefoxMediaTestsBase(TestingMixin
         if self.media_urls:
             cmd += ['--urls', self.media_urls]
         if self.profile:
             cmd += ['--profile', self.profile]
         if self.tests:
             cmd.append(self.tests)
         if self.e10s:
             cmd.append('--e10s')
+        if self.browsermob_script:
+            cmd += ['--browsermob-script', self.browsermob_script]
+        if self.browsermob_port:
+            cmd += ['--browsermob-port', self.browsermob_port]
 
         test_suite = self.config.get('test_suite')
         if test_suite not in self.config["suite_definitions"]:
             self.fatal("%s is not defined in the config!" % test_suite)
 
         test_manifest = None if test_suite != 'media-youtube-tests' else \
             os.path.join(dirs['external-media-tests'],
                          'external_media_tests',