Bug 1198448 - The Firefox UI update tests should call a different entry point. NPOTB. DONTBUILD. r=chmanchester
authorArmen Zambrano Gasparnian <armenzg@mozilla.com>
Tue, 08 Sep 2015 12:28:55 -0400
changeset 294044 ef749ba572a4f01d4e4df36cc783a9a29033faeb
parent 294043 5eeb7f51f5bf61486395e05ee650d615d912b5ce
child 294045 bbdcc9af68be979e5cd656fe35c5fd0031dfbc5d
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)
reviewerschmanchester
bugs1198448
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 1198448 - The Firefox UI update tests should call a different entry point. NPOTB. DONTBUILD. r=chmanchester When setting up the Firefox UI tests repository, it generates two binaries, one of them called firefox-ui-update. Calling this binary on Windows triggers the UAC prompt for the Release Engineering Windows test machines. If instead we use Python to call a script that calls the same functionality we don't get this UAC prompt. We also move around some pre action checks to the right place. This allows us to not need to specify --firefox-ui-branch when we're not running the checkout action.
testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
testing/mozharness/scripts/firefox_ui_tests/update_release.py
--- a/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
+++ b/testing/mozharness/mozharness/mozilla/testing/firefox_ui_tests.py
@@ -160,16 +160,23 @@ class FirefoxUITests(VCSToolsScript, Vir
                 return symbols_url
 
             except urllib2.HTTPError, e:
                 self.warning('{} - {}'.format(str(e), symbols_url))
                 return None
         else:
             self.fatal('Can\'t find symbols_url from installer_url: {}!'.format(installer_url))
 
+    @PreScriptAction('checkout')
+    def _pre_checkout(self, action):
+        if not self.firefox_ui_branch:
+            self.fatal(
+                'Please specify --firefox-ui-branch. Valid values can be found '
+                'in here https://github.com/mozilla/firefox-ui-tests/branches')
+
     def checkout(self):
         """
         We checkout firefox_ui_tests and update to the right branch
         for it.
         """
         dirs = self.query_abs_dirs()
 
         self.vcs_checkout(
@@ -198,23 +205,24 @@ class FirefoxUITests(VCSToolsScript, Vir
         """
         return []
 
     def run_test(self, installer_path, script_name, env=None, symbols_url=None,
                  cleanup=True, marionette_port=2828):
         """All required steps for running the tests against an installer."""
         dirs = self.query_abs_dirs()
 
-        bin_dir = os.path.dirname(self.query_python_path())
-        fx_ui_tests_bin = os.path.join(bin_dir, script_name)
+        venv_python_path = self.query_python_path()
+        update_script = os.path.join(dirs['fx_ui_dir'], 'firefox_ui_harness', 'cli_update.py')
         gecko_log = os.path.join(dirs['abs_log_dir'], 'gecko.log')
 
         # Build the command
         cmd = [
-            fx_ui_tests_bin,
+            venv_python_path,
+            update_script,
             '--installer', installer_path,
             # Log to stdout until tests are stable.
             '--gecko-log=-',
             '--address', 'localhost:{}'.format(marionette_port),
             # Use the work dir to get temporary data stored
             '--workspace', dirs['abs_work_dir'],
         ]
 
--- a/testing/mozharness/scripts/firefox_ui_tests/update_release.py
+++ b/testing/mozharness/scripts/firefox_ui_tests/update_release.py
@@ -209,18 +209,19 @@ class ReleaseFirefoxUIUpdateTests(Firefo
             chunks=int(self.config['total_chunks']),
             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, \
-            'You have to specify --release-update-config.'
+        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.'
 
     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())))