Bug 1246271 - The mozharness script at least needs to accept the browsermob settings to pass it down to the test runner. r=maja_zf,whimboo
authorSyd Polk <spolk@mozilla.com>
Thu, 10 Mar 2016 10:14:22 -0600
changeset 339588 940a177ba6a4875625482f17d52da5608bd1a2dd
parent 339587 5b6bcc1fec089df9ab8a72dca6abc9d74b81e12c
child 339589 5624c53dd9a5b3a38e734c3652dfdeb9e6f877c7
push id12762
push userbmo:rail@mozilla.com
push dateFri, 11 Mar 2016 19:47:45 +0000
reviewersmaja_zf, whimboo
bugs1246271
milestone48.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,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',