Bug 1203155 - Update firefox-ui-tests config to use strict version package dependencies and optional packages. r=armenzg DONTBUILD
authorHenrik Skupin <mail@hskupin.info>
Thu, 10 Sep 2015 18:32:56 +0200
changeset 294454 b5e4fcb51b1718b2dbf4870de31f1ec3954132db
parent 294453 6f234301d1b87053b8024d4fd401a93dc4e2ee08
child 294455 56f6468c7e6021006c2f4bbaa4b49b1ee54c243b
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersarmenzg
bugs1203155
milestone43.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 1203155 - Update firefox-ui-tests config to use strict version package dependencies and optional packages. r=armenzg DONTBUILD
testing/mozharness/configs/firefox_ui_tests/jenkins.py
testing/mozharness/mozharness/base/python.py
testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
testing/mozharness/scripts/firefox_ui_tests/update_release.py
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/firefox_ui_tests/jenkins.py
@@ -0,0 +1,6 @@
+config = {
+    'virtualenv_modules': [
+        # optional packages we need for Jenkins
+        'mozdownload==1.17',
+    ]
+}
--- a/testing/mozharness/mozharness/base/python.py
+++ b/testing/mozharness/mozharness/base/python.py
@@ -155,17 +155,17 @@ class VirtualenvMixin(object):
                 continue
             if '==' not in line:
                 self.fatal("pip_freeze_packages: Unrecognized output line: %s" % line)
             package, version = line.split('==', 1)
             packages[package] = version
 
         if log_output:
             self.info("Current package versions:")
-            for package in packages:
+            for package in sorted(packages):
                 self.info("  %s == %s" % (package, packages[package]))
 
         return packages
 
     def is_python_package_installed(self, package_name, error_level=WARNING):
         """
         Return whether the package is installed
         """
--- a/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
+++ b/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
@@ -133,20 +133,27 @@ class FirefoxUITests(VCSToolsScript, Vir
             if not os.path.exists(self.installer_path):
                 self.critical('Please make sure that the path to the installer exists.')
                 sys.exit(1)
 
     @PreScriptAction('create-virtualenv')
     def _pre_create_virtualenv(self, action):
         dirs = self.query_abs_dirs()
 
-        self.register_virtualenv_module(
-            'firefox-ui-tests',
-            url=dirs['fx_ui_dir'],
-        )
+        # List of exact versions of mozbase packages which are known to work
+        requirements_file = os.path.join(dirs['fx_ui_dir'], '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)
+
+        self.register_virtualenv_module('firefox-ui-tests', url=dirs['fx_ui_dir'])
 
     def _query_symbols_url(self, installer_url):
         for suffix in INSTALLER_SUFFIXES:
             if installer_url.endswith(suffix):
                 symbols_url = installer_url[:-len(suffix)] + '.crashreporter-symbols.zip'
                 continue
 
         if symbols_url:
--- a/testing/mozharness/scripts/firefox_ui_tests/update_release.py
+++ b/testing/mozharness/scripts/firefox_ui_tests/update_release.py
@@ -210,18 +210,18 @@ class ReleaseFirefoxUIUpdateTests(Firefo
             thisChunk=int(self.config['this_chunk'])
         )
 
         self.releases = chunked_config.releases
 
     @PreScriptAction('run-tests')
     def _pre_run_tests(self, action):
         assert ('release_update_config' in self.config or
-                self.installer_url or self.installer_path),
-                'Either specify --update-verify-config, --installer-url or --installer-path.'
+                self.installer_url or self.installer_path), \
+            'Either specify --update-verify-config, --installer-url or --installer-path.'
 
     def run_tests(self):
         dirs = self.query_abs_dirs()
 
         # We don't want multiple outputs of the same environment information. To prevent
         # that, we can't make it an argument of run_command and have to print it on our own.
         self.info('Using env: {}'.format(pprint.pformat(self.query_env())))