Bug 1452179: [mozharness] Don't special case the path to mozinstall on windows; r=whimboo
authorTom Prince <mozilla@hocat.ca>
Mon, 16 Apr 2018 01:23:04 -0600
changeset 468092 8bfb706430413ef5a3db44ec6f8337730b522a56
parent 468091 bf49dbd6d055ef1f7ae60fbe7eb0548ff066d1b7
child 468093 5ddb466ecccf327fa71304d2486797350c77e373
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo
bugs1452179
milestone61.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 1452179: [mozharness] Don't special case the path to mozinstall on windows; r=whimboo New versions of pip don't install entrypoint scripts with a `-script.py` on windows. Instead, just call the bare script name everywhere. On unix-like systems, this uses the shebang; on Windows, this executes the `.exe` wrapper. Differential Revision: https://phabricator.services.mozilla.com/D967
testing/mozharness/configs/awsy/taskcluster_windows_config.py
testing/mozharness/configs/firefox_ui_tests/taskcluster_windows.py
testing/mozharness/configs/marionette/windows_config.py
testing/mozharness/configs/marionette/windows_taskcluster_config.py
testing/mozharness/configs/talos/windows_config.py
testing/mozharness/configs/talos/windows_taskcluster_config.py
testing/mozharness/configs/talos/windows_vm_config.py
testing/mozharness/configs/unittests/win_taskcluster_unittest.py
testing/mozharness/configs/unittests/win_unittest.py
testing/mozharness/configs/web_platform_tests/prod_config_windows.py
testing/mozharness/configs/web_platform_tests/prod_config_windows_taskcluster.py
testing/mozharness/configs/web_platform_tests/test_config_windows.py
testing/mozharness/mozharness/mozilla/testing/testbase.py
--- a/testing/mozharness/configs/awsy/taskcluster_windows_config.py
+++ b/testing/mozharness/configs/awsy/taskcluster_windows_config.py
@@ -6,17 +6,16 @@ external_tools_path = os.path.join(
     os.path.abspath(os.path.dirname(os.path.dirname(mozharness.__file__))),
     'external_tools',
 )
 
 config = {
     "virtualenv_path": 'venv',
     "exes": {
         'python': sys.executable,
-        'mozinstall': ['build/venv/scripts/python', 'build/venv/scripts/mozinstall-script.py'],
         'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg')
     },
     "find_links": [
         "http://pypi.pub.build.mozilla.org/pub",
     ],
     "pip_index": False,
 
     "download_minidump_stackwalk": True,
--- a/testing/mozharness/configs/firefox_ui_tests/taskcluster_windows.py
+++ b/testing/mozharness/configs/firefox_ui_tests/taskcluster_windows.py
@@ -3,17 +3,16 @@
 import os
 import sys
 
 
 config = {
     "virtualenv_path": 'venv',
     "exes": {
         'python': sys.executable,
-        'mozinstall': ['build/venv/scripts/python', 'build/venv/scripts/mozinstall-script.py'],
         'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg')
     },
 
     "find_links": [
         "http://pypi.pub.build.mozilla.org/pub",
     ],
     "pip_index": False,
 
--- a/testing/mozharness/configs/marionette/windows_config.py
+++ b/testing/mozharness/configs/marionette/windows_config.py
@@ -5,18 +5,16 @@ config = {
     # marionette options
     "marionette_address": "localhost:2828",
     "test_manifest": "unit-tests.ini",
 
     "virtualenv_path": 'venv',
     "exes": {
         'python': 'c:/mozilla-build/python27/python',
         'hg': 'c:/mozilla-build/hg/hg',
-        'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
-                       '%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
     },
 
     "find_links": [
         "http://pypi.pvt.build.mozilla.org/pub",
         "http://pypi.pub.build.mozilla.org/pub",
     ],
     "pip_index": False,
 
--- a/testing/mozharness/configs/marionette/windows_taskcluster_config.py
+++ b/testing/mozharness/configs/marionette/windows_taskcluster_config.py
@@ -5,17 +5,16 @@ import sys
 config = {
     # marionette options
     "marionette_address": "localhost:2828",
     "test_manifest": "unit-tests.ini",
 
     "virtualenv_path": 'venv',
     "exes": {
         'python': sys.executable,
-        'mozinstall': ['build/venv/scripts/python', 'build/venv/scripts/mozinstall-script.py'],
         'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg')
     },
 
     "find_links": [
         "http://pypi.pub.build.mozilla.org/pub",
     ],
     "pip_index": False,
 
--- a/testing/mozharness/configs/talos/windows_config.py
+++ b/testing/mozharness/configs/talos/windows_config.py
@@ -14,18 +14,16 @@ config = {
     "pip_index": False,
     "find_links": [
         "http://pypi.pvt.build.mozilla.org/pub",
         "http://pypi.pub.build.mozilla.org/pub",
     ],
     "virtualenv_modules": ['pywin32', 'talos', 'mozinstall'],
     "exes": {
         'python': PYTHON,
-        'mozinstall': ['%s/scripts/python' % VENV_PATH,
-                       '%s/scripts/mozinstall-script.py' % VENV_PATH],
         'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg'),
         'tooltool.py': [PYTHON, os.path.join(os.environ['MOZILLABUILD'], 'tooltool.py')],
     },
     "title": socket.gethostname().split('.')[0],
     "default_actions": [
         "clobber",
         "read-buildbot-config",
         "download-and-extract",
--- a/testing/mozharness/configs/talos/windows_taskcluster_config.py
+++ b/testing/mozharness/configs/talos/windows_taskcluster_config.py
@@ -13,18 +13,16 @@ config = {
     "virtualenv_path": VENV_PATH,
     "pip_index": False,
     "find_links": [
         "http://pypi.pub.build.mozilla.org/pub",
     ],
     "virtualenv_modules": ['pypiwin32', 'talos', 'mozinstall'],
     "exes": {
         'python': PYTHON,
-        'mozinstall': ['%s/scripts/python' % VENV_PATH,
-                       '%s/scripts/mozinstall-script.py' % VENV_PATH],
         'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg'),
     },
     "title": socket.gethostname().split('.')[0],
     "default_actions": [
         "populate-webroot",
         "create-virtualenv",
         "install",
         "setup-mitmproxy",
--- a/testing/mozharness/configs/talos/windows_vm_config.py
+++ b/testing/mozharness/configs/talos/windows_vm_config.py
@@ -14,18 +14,16 @@ config = {
     "pip_index": False,
     "find_links": [
         "http://pypi.pvt.build.mozilla.org/pub",
         "http://pypi.pub.build.mozilla.org/pub",
     ],
     "virtualenv_modules": ['pywin32', 'talos', 'mozinstall'],
     "exes": {
         'python': PYTHON,
-        'mozinstall': ['%s/scripts/python' % VENV_PATH,
-                       '%s/scripts/mozinstall-script.py' % VENV_PATH],
         'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg'),
     },
     "title": socket.gethostname().split('.')[0],
     "default_actions": [
         "clobber",
         "read-buildbot-config",
         "download-and-extract",
         "populate-webroot",
--- a/testing/mozharness/configs/unittests/win_taskcluster_unittest.py
+++ b/testing/mozharness/configs/unittests/win_taskcluster_unittest.py
@@ -19,17 +19,16 @@ DESKTOP_VISUALFX_THEME = {
 TASKBAR_AUTOHIDE_REG_PATH = {
     'Windows 7': 'HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2',
     'Windows 10': 'HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3'
 }.get('{} {}'.format(platform.system(), platform.release()))
 #####
 config = {
     "exes": {
         'python': sys.executable,
-        'mozinstall': ['build/venv/scripts/python', 'build/venv/scripts/mozinstall-script.py'],
         'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg')
     },
     ###
     "installer_path": INSTALLER_PATH,
     "binary_path": BINARY_PATH,
     "xpcshell_name": XPCSHELL_NAME,
     "virtualenv_modules": ['pypiwin32'],
     "virtualenv_path": 'venv',
--- a/testing/mozharness/configs/unittests/win_unittest.py
+++ b/testing/mozharness/configs/unittests/win_unittest.py
@@ -10,18 +10,16 @@ EXE_SUFFIX = '.exe'
 DISABLE_SCREEN_SAVER = False
 ADJUST_MOUSE_AND_SCREEN = True
 #####
 config = {
     "buildbot_json_path": "buildprops.json",
     "exes": {
         'python': sys.executable,
         'hg': 'c:/mozilla-build/hg/hg',
-        'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
-                       '%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
     },
     ###
     "installer_path": INSTALLER_PATH,
     "binary_path": BINARY_PATH,
     "xpcshell_name": XPCSHELL_NAME,
     "virtualenv_path": 'venv',
     "virtualenv_modules": ['pywin32'],
 
--- a/testing/mozharness/configs/web_platform_tests/prod_config_windows.py
+++ b/testing/mozharness/configs/web_platform_tests/prod_config_windows.py
@@ -18,18 +18,16 @@ config = {
         "--host-key-path=%(test_path)s/certs/web-platform.test.key",
         "--host-cert-path=%(test_path)s/certs/web-platform.test.pem",
         "--certutil-binary=%(test_install_path)s/bin/certutil",
     ],
 
     "exes": {
         'python': sys.executable,
         'hg': 'c:/mozilla-build/hg/hg',
-        'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
-                       '%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
     },
 
     "find_links": [
         "http://pypi.pvt.build.mozilla.org/pub",
         "http://pypi.pub.build.mozilla.org/pub",
     ],
 
     "pip_index": False,
--- a/testing/mozharness/configs/web_platform_tests/prod_config_windows_taskcluster.py
+++ b/testing/mozharness/configs/web_platform_tests/prod_config_windows_taskcluster.py
@@ -17,17 +17,16 @@ config = {
         "--ca-cert-path=%(test_path)s/certs/cacert.pem",
         "--host-key-path=%(test_path)s/certs/web-platform.test.key",
         "--host-cert-path=%(test_path)s/certs/web-platform.test.pem",
         "--certutil-binary=%(test_install_path)s/bin/certutil",
     ],
 
     "exes": {
         'python': sys.executable,
-        'mozinstall': ['build/venv/scripts/python', 'build/venv/scripts/mozinstall-script.py'],
         'hg': os.path.join(os.environ['PROGRAMFILES'], 'Mercurial', 'hg')
     },
 
     "find_links": [
         "http://pypi.pub.build.mozilla.org/pub",
     ],
 
     "pip_index": False,
--- a/testing/mozharness/configs/web_platform_tests/test_config_windows.py
+++ b/testing/mozharness/configs/web_platform_tests/test_config_windows.py
@@ -1,33 +1,30 @@
 # ***** BEGIN LICENSE BLOCK *****
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 # ***** END LICENSE BLOCK *****
 
-import os
 import sys
 
 config = {
     "options": [
         "--prefs-root=%(test_path)s/prefs",
         "--processes=1",
         "--config=%(test_path)s/wptrunner.ini",
         "--ca-cert-path=%(test_path)s/certs/cacert.pem",
         "--host-key-path=%(test_path)s/certs/web-platform.test.key",
         "--host-cert-path=%(test_path)s/certs/web-platform.test.pem",
         "--certutil-binary=%(test_install_path)s/bin/certutil",
     ],
 
     "exes": {
         'python': sys.executable,
         'hg': 'c:/mozilla-build/hg/hg',
-        'mozinstall': ['%s/build/venv/scripts/python' % os.getcwd(),
-                       '%s/build/venv/scripts/mozinstall-script.py' % os.getcwd()],
     },
 
     "default_actions": [
         'clobber',
         'download-and-extract',
         'create-virtualenv',
         'pull',
         'install',
--- a/testing/mozharness/mozharness/mozilla/testing/testbase.py
+++ b/testing/mozharness/mozharness/mozilla/testing/testbase.py
@@ -585,17 +585,17 @@ 2. running the download-and-extract acti
 """)
         if not self.is_python_package_installed("mozInstall"):
             self.fatal("""Can't call install() without mozinstall!
 Did you run with --create-virtualenv? Is mozinstall in virtualenv_modules?""")
 
     def install_app(self, app=None, target_dir=None, installer_path=None):
         """ Dependent on mozinstall """
         # install the application
-        cmd = self.query_exe("mozinstall", default=self.query_python_path("mozinstall"), return_type="list")
+        cmd = [self.query_python_path("mozinstall")]
         if app:
             cmd.extend(['--app', app])
         # Remove the below when we no longer need to support mozinstall 0.3
         self.info("Detecting whether we're running mozinstall >=1.0...")
         output = self.get_output_from_command(cmd + ['-h'])
         if '--source' in output:
             cmd.append('--source')
         # End remove