Bug 1197224 - Part 4 Call tests via Python entry-point; r?jgriffin
authorMaja Frydrychowicz <mjzffr@gmail.com>
Thu, 24 Sep 2015 16:35:18 -0400
changeset 326847 769a602cfe63d8774027c10206caed2004cf7b52
parent 326846 78f26721ef4e5ca906d44179f8855ea9c954b1b8
child 326848 210f3ed93368c0ba781b55faf3341520059ccc4f
push id10169
push userdminor@mozilla.com
push dateThu, 28 Jan 2016 13:10:48 +0000
reviewersjgriffin
bugs1197224, 1198448
milestone43.0a1
Bug 1197224 - Part 4 Call tests via Python entry-point; r?jgriffin Similarly to Bug 1198448, calling the firefox-media-tests binary on Windows fails because it triggers a UAC prompt. Instead, we call the same entry-point script via Python.
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
@@ -203,17 +203,22 @@ class FirefoxMediaTestsBase(TestingMixin
         if revision:
             self.vcs_checkout(vcs='gittool', **self.firefox_ui_vc)
 
     def _query_cmd(self):
         """ Determine how to call firefox-media-tests """
         if not self.binary_path:
             self.fatal("Binary path could not be determined. "
                        "Should be set by default during 'install' action.")
-        cmd = ['firefox-media-tests']
+        dirs = self.query_abs_dirs()
+        venv_python_path = self.query_python_path()
+        runner_script = os.path.join(dirs['firefox_media_dir'],
+                                     'media_test_harness',
+                                     'runtests.py')
+        cmd = [venv_python_path, runner_script]
         cmd += ['--binary', self.binary_path]
         if self.symbols_path:
             cmd += ['--symbols-path', self.symbols_path]
         if self.media_urls:
             cmd += ['--urls', self.media_urls]
         if self.profile:
             cmd += ['--profile', self.profile]
         if self.tests: