Bug 1305795 - Install Python packages from source checkout; r?ted draft
authorGregory Szorc <gps@mozilla.com>
Tue, 27 Sep 2016 11:21:22 -0700
changeset 418559 bdf25dc77c2bbe734bee0810bb678f3912ca51bf
parent 418558 966834d5c4d2195b90767bea86dce60646d4b4f8
child 418560 7a3db9326a6dd5d6ca452de948cdf2aca695a495
push id30707
push userbmo:gps@mozilla.com
push dateWed, 28 Sep 2016 18:02:51 +0000
reviewersted
bugs1305795
milestone52.0a1
Bug 1305795 - Install Python packages from source checkout; r?ted Previously, we extracted Python packages for mozbase, marionette, and wptserve from common.tests.zip and installed them from an extracted directory. These files in the test archive were copies of files from a source checkout. Now that we have a source checkout in the WPT execution environment, these files are redundant and we can simply reference files from the source checkout instead. We copy the existing marionette_requirements.txt to marionette_in_tree_requirements.txt and modify relative paths to reflect the source tree layout. We update the WPT mozharness script to use this new requirements file from a source checkout. And since we no longer need these Python files from the zip archive, we stop extracting them. MozReview-Commit-ID: EeVh0wLn326
testing/config/marionette_in_tree_requirements.txt
testing/mozharness/scripts/web_platform_tests.py
copy from testing/config/marionette_requirements.txt
copy to testing/config/marionette_in_tree_requirements.txt
--- a/testing/config/marionette_requirements.txt
+++ b/testing/config/marionette_in_tree_requirements.txt
@@ -1,5 +1,7 @@
+# Version of marionette_requirements that works with in-tree paths.
+# Used when running Marionette from a source checkout.
 -r mozbase_requirements.txt
-../tools/wptserve
+../web-platform/tests/tools/wptserve
 ../marionette/client
-../marionette/marionette/runner/mixins/browsermob-proxy-py
-../marionette
+../marionette/harness/marionette/runner/mixins/browsermob-proxy-py
+../marionette/harness
--- a/testing/mozharness/scripts/web_platform_tests.py
+++ b/testing/mozharness/scripts/web_platform_tests.py
@@ -100,19 +100,18 @@ class WebPlatformTest(TestingMixin, Merc
         self.abs_dirs = abs_dirs
 
         return self.abs_dirs
 
     @PreScriptAction('create-virtualenv')
     def _pre_create_virtualenv(self, action):
         dirs = self.query_abs_dirs()
 
-        requirements = os.path.join(dirs['abs_test_install_dir'],
-                                    'config',
-                                    'marionette_requirements.txt')
+        requirements = os.path.join(dirs['checkout'], 'testing', 'config',
+                                    'marionette_in_tree_requirements.txt')
 
         self.register_virtualenv_module(requirements=[requirements],
                                         two_pass=True)
 
     def _query_cmd(self):
         if not self.binary_path:
             self.fatal("Binary path could not be determined")
             #And exit
@@ -180,19 +179,16 @@ class WebPlatformTest(TestingMixin, Merc
                                          str_format_values=str_format_values))
 
         return cmd
 
     def download_and_extract(self):
         super(WebPlatformTest, self).download_and_extract(
             extract_dirs=["bin/*",
                           "config/*",
-                          "mozbase/*",
-                          "marionette/*",
-                          "tools/wptserve/*",
                           "mozinfo.json"],
             suite_categories=["web-platform"])
 
     def run_tests(self):
         dirs = self.query_abs_dirs()
         cmd = self._query_cmd()
 
         parser = StructuredOutputParser(config=self.config,