Bug 1232466 - beta CI builds fail trying to use printconfigsetting.py and running prettyname targets for package and update, r=mshal
☠☠ backed out by 2293d99fd1fc ☠ ☠
authorRail Aliiev <rail@mozilla.com>
Wed, 16 Dec 2015 09:57:26 -0500
changeset 4603 73e830d00659a3ba5a85f59f79968ccceabea093
parent 4600 b99e35634c328c747af77d8048c14edf6fcb8276
child 4604 467276196a49244a4819607078f27b9e6d0db8a1
child 4605 2293d99fd1fc26293047adb77d38a14a5e8e3c4e
push id3857
push userraliiev@mozilla.com
push dateWed, 16 Dec 2015 14:57:31 +0000
reviewersmshal
bugs1232466
Bug 1232466 - beta CI builds fail trying to use printconfigsetting.py and running prettyname targets for package and update, r=mshal
process/factory.py
--- a/process/factory.py
+++ b/process/factory.py
@@ -1370,31 +1370,35 @@ class MercurialBuildFactory(MozillaBuild
                 python = ['/tools/buildbot/bin/python']
             # we need abs paths because we are in a non relative workdir
             printconfig_base_command = python + [
                 WithProperties('%(basedir)s/build/mach'), 'python',
                 WithProperties('%(basedir)s/build' + '%s/config/printconfigsetting.py' % self.mozillaSrcDir),
                 WithProperties('%(basedir)s/build' + '/%s/dist/bin/application.ini' % self.mozillaObjdir),
             ]
 
-            self.addStep(SetProperty(
+            self.addStep(MockProperty(
                 command=printconfig_base_command + ['App', 'BuildID'],
                 property='buildid',
                 workdir=printconfig_workdir,
                 env=printconfig_env,
                 description=['getting', 'buildid'],
                 descriptionDone=['got', 'buildid'],
+                mock=self.use_mock,
+                target=self.mock_target,
             ))
-            self.addStep(SetProperty(
+            self.addStep(MockProperty(
                 command=printconfig_base_command + ['App', 'SourceStamp'],
                 property='sourcestamp',
                 workdir=printconfig_workdir,
                 env=printconfig_env,
                 description=['getting', 'sourcestamp'],
-                descriptionDone=['got', 'sourcestamp']
+                descriptionDone=['got', 'sourcestamp'],
+                mock=self.use_mock,
+                target=self.mock_target,
             ))
             self._gotBuildInfo = True
 
     def addBuildAnalysisSteps(self):
         if self.platform in ('linux', 'linux64'):
             # Analyze the number of ctors
             def get_ctors(rc, stdout, stderr):
                 try:
@@ -1661,36 +1665,42 @@ class MercurialBuildFactory(MozillaBuild
         else:
             python = ['/tools/buildbot/bin/python']
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
             WithProperties('%(basedir)s/build/mach'), 'python',
             WithProperties('%(basedir)s/build' + '%s/config/printconfigsetting.py' % self.mozillaSrcDir),
             WithProperties('%(basedir)s/build' + '/%s/dist/bin/application.ini' % self.mozillaObjdir),
         ]
-        self.addStep(SetProperty(
+        self.addStep(MockProperty(
             command=printconfig_base_command + ['App', 'BuildID'],
             property='buildid',
             workdir=printconfig_workdir,
             env=printconfig_env,
             name='get_build_id',
+            mock=self.use_mock,
+            target=self.mock_target,
         ))
-        self.addStep(SetProperty(
+        self.addStep(MockProperty(
             command=printconfig_base_command + ['App', 'Version'],
             property='appVersion',
             workdir=printconfig_workdir,
             env=printconfig_env,
             name='get_app_version',
+            mock=self.use_mock,
+            target=self.mock_target,
         ))
-        self.addStep(SetProperty(
+        self.addStep(MockProperty(
             command=printconfig_base_command + ['App', 'Name'],
             property='appName',
             workdir=printconfig_workdir,
             env=printconfig_env,
             name='get_app_name',
+            mock=self.use_mock,
+            target=self.mock_target,
         ))
         self.pkg_env = pkg_env
 
     def addUploadSteps(self):
         if self.multiLocale:
             self.doUpload(postUploadBuildDir='en-US')
             cmd = ['python', '%s/%s' % (self.mozharness_path, self.multiLocaleScript),
                    '--config-file', self.multiLocaleConfig]
@@ -2167,25 +2177,27 @@ class NightlyBuildFactory(MercurialBuild
             python = ['/tools/buildbot/bin/python']
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
             WithProperties('%(basedir)s/build/mach'), 'python',
             # abs*Dir attrs lie. they are not absolute paths
             WithProperties('%(basedir)s/' + '%s/config/printconfigsetting.py' % self.absMozillaSrcDir),
             WithProperties('%(basedir)s/' + self.absMozillaObjDir + '/%(previous_inipath)s')
         ]
-        self.addStep(SetProperty(
+        self.addStep(MockProperty(
             name='set_previous_buildid',
             description=['set', 'previous', 'buildid'],
             doStepIf=self.previousMarExists,
             command=printconfig_base_command + ['App', 'BuildID'],
             property='previous_buildid',
             workdir=printconfig_workdir,
             env=printconfig_env,
             haltOnFailure=True,
+            mock=self.use_mock,
+            target=self.mock_target,
         ))
         for dir in ['current', 'previous']:
             self.addStep(ShellCommand(
                 name='remove pgc files (%s)' % dir,
                 command="find . -name \*.pgc -print -delete",
                 env=updateEnv,
                 workdir="%s/%s" % (self.absMozillaObjDir, dir),
                 flunkOnFailure=False,
@@ -3546,36 +3558,42 @@ class NightlyRepackFactory(BaseRepackFac
             python = ['/tools/buildbot/bin/python']
         # we need abs paths because we are in a non relative workdir
         printconfig_base_command = python + [
             WithProperties('%(basedir)s/build/mach'), 'python',
             # abs*Dir attrs lie. they are not absolute paths
             WithProperties('%(basedir)s/' + '%s/config/printconfigsetting.py' % self.absMozillaSrcDir),
             WithProperties('%(basedir)s/' + self.absMozillaObjDir + '%(inipath)s')
         ]
-        self.addStep(SetProperty(
+        self.addStep(MockProperty(
             command=printconfig_base_command + ['App', 'BuildID'],
             name='get_build_id',
             workdir=printconfig_workdir,
             env=printconfig_env,
             property='buildid',
+            mock=self.use_mock,
+            target=self.mock_target,
         ))
-        self.addStep(SetProperty(
+        self.addStep(MockProperty(
             command=printconfig_base_command + ['App', 'Version'],
             property='appVersion',
             name='get_app_version',
             workdir=printconfig_workdir,
             env=printconfig_env,
+            mock=self.use_mock,
+            target=self.mock_target,
         ))
-        self.addStep(SetProperty(
+        self.addStep(MockProperty(
             command=printconfig_base_command + ['App', 'Name'],
             property='appName',
             name='get_app_name',
             workdir=printconfig_workdir,
             env=printconfig_env,
+            mock=self.use_mock,
+            target=self.mock_target,
         ))
 
         if self.l10nNightlyUpdate:
             self.addFilePropertiesSteps(filename='*.complete.mar',
                                         directory='%s/dist/update' % self.absMozillaObjDir,
                                         fileType='completeMar',
                                         haltOnFailure=True)