Bug 1286900 - Use WPT files from source checkout; r=ted
☠☠ backed out by aed585286446 ☠ ☠
authorGregory Szorc <gps@mozilla.com>
Mon, 26 Sep 2016 23:32:31 -0700
changeset 315355 4b08ed30e0a5326dc1b63949d7e8375561a6dce8
parent 315354 3928e945b584cb4efd837fcd0bb55fca88f3a656
child 315356 859457467e3c1ad5da67f684bfc9a6d568c192dd
push id30748
push usercbook@mozilla.com
push dateWed, 28 Sep 2016 13:53:19 +0000
treeherdermozilla-central@8c84b7618840 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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 1286900 - Use WPT files from source checkout; r=ted We're starting to execute mozharness scripts from source checkouts in automation. This means we can stop downloading and extracting files that are already available in the source checkout and just reference files from the checkout. Web platform tests (WPT) are a logical place to start because they are pretty well isolated. This commit modifies the mozharness script for WPT execution to use files from a source checkout (previous commits have guaranteed that a pristine source checkout is available to the test execution environment). As part of this, we also need to define an explicit mozinfo.json path because previously it was relying on parent directory traversal to find it (WPT tests were under a directory containing the mozinfo.json file). MozReview-Commit-ID: C1dlKC4eSzr
--- a/testing/mozharness/scripts/web_platform_tests.py
+++ b/testing/mozharness/scripts/web_platform_tests.py
@@ -89,17 +89,17 @@ class WebPlatformTest(TestingMixin, Merc
     def query_abs_dirs(self):
         if self.abs_dirs:
             return self.abs_dirs
         abs_dirs = super(WebPlatformTest, self).query_abs_dirs()
         dirs = {}
         dirs['abs_app_install_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'application')
         dirs['abs_test_install_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'tests')
-        dirs["abs_wpttest_dir"] = os.path.join(dirs['abs_test_install_dir'], "web-platform")
+        dirs['abs_wpttest_dir'] = os.path.join(abs_dirs['checkout'], 'testing', 'web-platform')
         dirs['abs_blob_upload_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'blobber_upload_dir')
         self.abs_dirs = abs_dirs
         return self.abs_dirs
@@ -138,17 +138,17 @@ class WebPlatformTest(TestingMixin, Merc
             '--log-raw=%s' % os.path.join(blob_upload_dir, 'wpt_raw.log'),
             '--log-errorsummary=%s' % os.path.join(blob_upload_dir,
             '--binary=%s' % self.binary_path,
             '--symbols-path=%s' % self.query_symbols_url(),
             '--stackwalk-binary=%s' % self.query_minidump_stackwalk(),
-            '--prefs-root=%s/prefs' % wpt_dir,
+            '--prefs-root=%s' % os.path.join(dirs['checkout'], 'testing', 'profiles'),
             '--config=%s/wptrunner.ini' % wpt_dir,
             '--ca-cert-path=%s/certs/cacert.pem' % wpt_dir,
             '--host-key-path=%s/certs/web-platform.test.key' % wpt_dir,
             '--host-cert-path=%s/certs/web-platform.test.pem' % wpt_dir,
             '--certutil-binary=%s/bin/certutil' % dirs['abs_test_install_dir'],
         for test_type in c.get("test_type", []):
@@ -184,28 +184,33 @@ class WebPlatformTest(TestingMixin, Merc
     def download_and_extract(self):
         super(WebPlatformTest, self).download_and_extract(
-                          "web-platform/*"],
+                          "web-platform/*",
+                          "mozinfo.json"],
     def run_tests(self):
         dirs = self.query_abs_dirs()
         cmd = self._query_cmd()
         parser = StructuredOutputParser(config=self.config,
-        env = {'MINIDUMP_SAVE_PATH': dirs['abs_blob_upload_dir']}
+        env = {
+            'MINIDUMP_SAVE_PATH': dirs['abs_blob_upload_dir'],
+            'MOZINFO_PATH': os.path.join(dirs['abs_test_install_dir'],
+                                         'mozinfo.json'),
+        }
         if self.config['allow_software_gl_layers']:
             env['MOZ_LAYERS_ALLOW_SOFTWARE_GL'] = '1'
         env = self.query_env(partial_env=env, log_level=INFO)
         return_code = self.run_command(cmd,