Bug 1203533 - Run create_virtualenv outside mock; r=jlund
authorMike Shal <mshal@mozilla.com>
Thu, 10 Sep 2015 10:59:41 -0400
changeset 294458 37251ea8e90188288abdd05c667249b636d56ea4
parent 294457 b660da4b26e0c386be0324951f64f812848505af
child 294459 4c6d311c5911c057a9333ce82f2869ebe484b540
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)
reviewersjlund
bugs1203533
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 1203533 - Run create_virtualenv outside mock; r=jlund
testing/mozharness/scripts/desktop_l10n.py
--- a/testing/mozharness/scripts/desktop_l10n.py
+++ b/testing/mozharness/scripts/desktop_l10n.py
@@ -156,17 +156,16 @@ class DesktopSingleLocale(LocalesMixin, 
         # fxbuild style:
         buildscript_kwargs = {
             'all_actions': [
                 "clobber",
                 "pull",
                 "list-locales",
                 "setup",
                 "repack",
-                "create-virtualenv",
                 "taskcluster-upload",
                 "funsize-props",
                 "submit-to-balrog",
                 "summary",
             ],
             'config': {
                 "buildbot_json_path": "buildprops.json",
                 "ignore_locales": ["en-US"],
@@ -971,16 +970,24 @@ class DesktopSingleLocale(LocalesMixin, 
         credentials = {}
         execfile(auth, credentials)
         client_id = credentials.get('taskcluster_clientId')
         access_token = credentials.get('taskcluster_accessToken')
         if not client_id or not access_token:
             self.warning('Skipping S3 file upload: No taskcluster credentials.')
             return
 
+        # We need to activate the virtualenv so that we can import taskcluster
+        # (and its dependent modules, like requests and hawk).  Normally we
+        # could create the virtualenv as an action, but due to some odd
+        # dependencies with query_build_env() being called from build(), which
+        # is necessary before the virtualenv can be created.
+        self.disable_mock()
+        self.create_virtualenv()
+        self.enable_mock()
         self.activate_virtualenv()
 
         # Enable Taskcluster debug logging, so at least we get some debug
         # messages while we are testing uploads.
         logging.getLogger('taskcluster').setLevel(logging.DEBUG)
 
         branch = self.config['branch']
         platform = self.config['platform']