Bug 1237600 - Ensure Python packages for firefox-ui-tests are installed from in-tree. r=jlund a=testonly
authorHenrik Skupin <mail@hskupin.info>
Thu, 21 Jan 2016 21:36:23 +0100
changeset 310910 468638b88f3cec55a7062412ff8d978b3de0dd2d
parent 310909 b9cf5e85cf7f683d288bd1e0370af8a6be13190a
child 310911 ec2bd9b72622961153d7f3c4b3fd01dcad5b0295
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlund, testonly
bugs1237600
milestone45.0a2
Bug 1237600 - Ensure Python packages for firefox-ui-tests are installed from in-tree. r=jlund a=testonly
testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
--- a/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
+++ b/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
@@ -141,36 +141,30 @@ class FirefoxUITests(TestingMixin, VCSTo
     def _pre_create_virtualenv(self, action):
         dirs = self.query_abs_dirs()
 
         # If tests are used from common.tests.zip install every Python package
         # via the single requirements file
         if self.test_packages_url or self.test_url:
             test_install_dir = dirs.get('abs_test_install_dir',
                                         os.path.join(dirs['abs_work_dir'], 'tests'))
-            requirements_file = os.path.join(test_install_dir,
-                                             'config', 'firefox_ui_requirements.txt')
-            if os.path.isfile(requirements_file):
-                self.register_virtualenv_module(requirements=[requirements_file])
+            requirements = os.path.join(test_install_dir,
+                                        'config', 'firefox_ui_requirements.txt')
+            self.register_virtualenv_module(requirements=[requirements], two_pass=True)
 
         # We have a non-packaged version of Firefox UI tests. So install requirements
         # and the firefox-ui-tests package separately
+        # TODO - Can be removed when the github repository is no longer needed
         else:
             # Register all modules for firefox-ui-tests including all dependencies
             # as strict versions to ensure newer releases won't break something
-            requirements_file = os.path.join(dirs.get('abs_test_install_dir',
-                                                      os.path.join(dirs['abs_work_dir'], 'tests')),
-                                             'requirements.txt')
-            if os.path.isfile(requirements_file):
-                self.register_virtualenv_module(requirements=[requirements_file])
-
-            # Optional packages to be installed, e.g. for Jenkins
-            if self.config.get('virtualenv_modules'):
-                for module in self.config['virtualenv_modules']:
-                    self.register_virtualenv_module(module)
+            requirements = os.path.join(dirs.get('abs_test_install_dir',
+                                                 os.path.join(dirs['abs_work_dir'], 'tests')),
+                                        'requirements.txt')
+            self.register_virtualenv_module(requirements=[requirements])
 
     def checkout(self):
         """Clone the firefox-ui-tests repository."""
         dirs = self.query_abs_dirs()
 
         self.vcs_checkout(
             repo=self.firefox_ui_repo,
             dest=dirs.get('abs_test_install_dir',