Bug 1227102 - tooltool_fetch() should download tooltool if instructed via the config. r=jlund
authorHenrik Skupin <mail@hskupin.info>
Mon, 23 Nov 2015 14:11:41 +0100
changeset 273885 dd4d0cb00f4339c1dc5a09b66d1075cb813e46f9
parent 273884 5d0bf692472248d6dedd790e17a223e855114e17
child 273886 e665ea64eb1526dc69cc4590c17d5c651525ed3c
push id29715
push userkwierso@gmail.com
push dateTue, 24 Nov 2015 21:54:25 +0000
treeherdermozilla-central@d9243e369c22 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlund
bugs1227102
milestone45.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 1227102 - tooltool_fetch() should download tooltool if instructed via the config. r=jlund
testing/mozharness/mozharness/mozilla/tooltool.py
--- a/testing/mozharness/mozharness/mozilla/tooltool.py
+++ b/testing/mozharness/mozharness/mozilla/tooltool.py
@@ -44,26 +44,21 @@ class TooltoolMixin(object):
         # take care of auth.  Everywhere else, we'll get auth failures if
         # necessary.
         if os.path.exists(fn):
             return fn
 
     def tooltool_fetch(self, manifest,
                        output_dir=None, privileged=False, cache=None):
         """docstring for tooltool_fetch"""
-        tooltool = self.query_exe('tooltool.py', return_type='list')
 
         if self.config.get("download_tooltool"):
-            tooltool = [bin for bin in tooltool if os.path.exists(bin)]
-            if tooltool:
-                cmd = [tooltool[0]]
-            else:
-                cmd = [self._fetch_tooltool_py()]
+            cmd = [sys.executable, self._fetch_tooltool_py()]
         else:
-            cmd = tooltool
+            cmd = self.query_exe('tooltool.py', return_type='list')
 
         # get the tooltool servers from configuration
         default_urls = self.config.get('tooltool_servers', TOOLTOOL_SERVERS)
 
         # add slashes (bug 1155630)
         def add_slash(url):
             return url if url.endswith('/') else (url + '/')
         default_urls = [add_slash(u) for u in default_urls]