Bug 1197224 - Part 2: configure mozharness script to run media tests on Windows, r=jgriffin, DONTBUILD because NPOTB
authorMaja Frydrychowicz <mjzffr@gmail.com>
Tue, 29 Sep 2015 07:48:47 -0400
changeset 264992 992ee69d7c2e58c0a245ece909c41710324dc6db
parent 264991 84a0c01dcfdac8d25187b87c71e06eb81407c5e1
child 264993 00cd37ae27b7ecf6edc8cbc5f44f8ab60d90231b
push id65813
push userjgriffin@mozilla.com
push dateTue, 29 Sep 2015 16:45:50 +0000
treeherdermozilla-inbound@992ee69d7c2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin, DONTBUILD
bugs1197224
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1197224 - Part 2: configure mozharness script to run media tests on Windows, r=jgriffin, DONTBUILD because NPOTB
testing/mozharness/configs/mediatests/buildbot_posix_config.py
testing/mozharness/configs/mediatests/buildbot_windows_config.py
testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py
--- a/testing/mozharness/configs/mediatests/buildbot_posix_config.py
+++ b/testing/mozharness/configs/mediatests/buildbot_posix_config.py
@@ -36,14 +36,14 @@ config = {
          "https://blobupload.elasticbeanstalk.com",
     ],
     "blob_uploader_auth_file" : os.path.join(os.getcwd(), "oauth.txt"),
     "download_minidump_stackwalk": True,
     "download_symbols": "ondemand",
 
     "firefox_media_repo": 'https://github.com/mjzffr/firefox-media-tests.git',
     "firefox_media_branch": 'master',
-    "firefox_media_rev": '82c45fba24457b5fe447e967bbcaaec5eb14e3ee',
+    "firefox_media_rev": 'b11d6c3d7f6af166be314d2ac6673e78c1edb566',
     "firefox_ui_repo": 'https://github.com/mozilla/firefox-ui-tests.git',
-    "firefox_ui_branch": 'master',
+    "firefox_ui_branch": 'mozilla-central',
     "firefox_ui_rev": '6d6d57917f85399e903ac69b7e4297091b2d474c',
 
 }
--- a/testing/mozharness/configs/mediatests/buildbot_windows_config.py
+++ b/testing/mozharness/configs/mediatests/buildbot_windows_config.py
@@ -12,17 +12,20 @@ config = {
     "virtualenv_path": 'venv',
     "exes": {
         'python': 'c:/mozilla-build/python27/python',
         'virtualenv': ['c:/mozilla-build/python27/python', 'c:/mozilla-build/buildbotve/virtualenv.py'],
         'hg': 'c:/mozilla-build/hg/hg',
         'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
                        '%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
         'tooltool.py': [sys.executable, 'C:/mozilla-build/tooltool.py'],
-        'gittool.py': os.path.join(external_tools_path, 'gittool.py'),
+        'gittool.py': [sys.executable,
+                       os.path.join(external_tools_path, 'gittool.py')],
+        'hgtool.py': [sys.executable,
+                      os.path.join(external_tools_path, 'hgtool.py')],
 
 
     },
 
     "find_links": [
         "http://pypi.pvt.build.mozilla.org/pub",
         "http://pypi.pub.build.mozilla.org/pub",
     ],
@@ -44,14 +47,14 @@ config = {
     ],
     "blob_uploader_auth_file" : os.path.join(os.getcwd(), "oauth.txt"),
     "in_tree_config": "config/mozharness/marionette.py",
     "download_minidump_stackwalk": True,
     "download_symbols": "ondemand",
 
     "firefox_media_repo": 'https://github.com/mjzffr/firefox-media-tests.git',
     "firefox_media_branch": 'master',
-    "firefox_media_rev": '82c45fba24457b5fe447e967bbcaaec5eb14e3ee',
+    "firefox_media_rev": 'b11d6c3d7f6af166be314d2ac6673e78c1edb566',
     "firefox_ui_repo": 'https://github.com/mozilla/firefox-ui-tests.git',
-    "firefox_ui_branch": 'master',
+    "firefox_ui_branch": 'mozilla-central',
     "firefox_ui_rev": '6d6d57917f85399e903ac69b7e4297091b2d474c',
 
 }
--- a/testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py
+++ b/testing/mozharness/mozharness/mozilla/testing/firefox_media_tests.py
@@ -152,25 +152,24 @@ class FirefoxMediaTestsBase(TestingMixin
         self.profile = c.get('profile')
         self.test_timeout = int(c.get('test_timeout'))
         self.tests = c.get('tests')
         self.e10s = c.get('e10s')
 
     @PreScriptAction('create-virtualenv')
     def _pre_create_virtualenv(self, action):
         dirs = self.query_abs_dirs()
-        # cwd is $workspace/build
+        requirements_file = os.path.join(dirs['firefox_media_dir'],
+                                         'requirements.txt')
+        if os.path.isfile(requirements_file):
+            self.register_virtualenv_module(requirements=[requirements_file])
         self.register_virtualenv_module(name='firefox-ui-tests',
-                                        url=dirs['firefox_ui_dir'],
-                                        method='pip',
-                                        editable='true')
+                                        url=dirs['firefox_ui_dir'])
         self.register_virtualenv_module(name='firefox-media-tests',
-                                        url=dirs['firefox_media_dir'],
-                                        method='pip',
-                                        editable='true')
+                                        url=dirs['firefox_media_dir'])
 
     def query_abs_dirs(self):
         if self.abs_dirs:
             return self.abs_dirs
         abs_dirs = super(FirefoxMediaTestsBase, self).query_abs_dirs()
         dirs = {
             'firefox_media_dir': os.path.join(abs_dirs['abs_work_dir'],
                                               'firefox-media-tests')
@@ -204,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: