Bug 1203596: Remove .userconfig after run build.sh. r=jlund
authorWander Lairson Costa <wcosta@mozilla.com>
Wed, 16 Sep 2015 10:40:40 +0200
changeset 295426 d39277479422b1672174154dbc764d5664581270
parent 295425 d0f2e3af0595a6e3e8d43b12c15ffaf70c137aa5
child 295427 7b7074a53e5c49c75a562f6f63bf89f15f1fdb21
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
bugs1203596
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 1203596: Remove .userconfig after run build.sh. r=jlund If we keep the userconfig file inside B2G shared cache, it may cause build bustage in other branches.
testing/mozharness/scripts/b2g_build.py
--- a/testing/mozharness/scripts/b2g_build.py
+++ b/testing/mozharness/scripts/b2g_build.py
@@ -32,16 +32,17 @@ from mozharness.mozilla.purge import Pur
 from mozharness.mozilla.signing import SigningMixin
 from mozharness.mozilla.repo_manifest import add_project
 from mozharness.mozilla.mapper import MapperMixin
 from mozharness.mozilla.updates.balrog import BalrogMixin
 from mozharness.base.python import VirtualenvMixin
 from mozharness.base.python import InfluxRecordingMixin
 from mozharness.mozilla.building.buildbase import MakeUploadOutputParser
 from mozharness.mozilla.building.buildb2gbase import B2GBuildBaseScript, B2GMakefileErrorList
+from mozharness.base.script import PostScriptRun
 
 
 class B2GBuild(LocalesMixin, PurgeMixin,
                B2GBuildBaseScript,
                GaiaLocalesMixin, SigningMixin, MapperMixin, BalrogMixin,
                VirtualenvMixin, InfluxRecordingMixin):
     all_actions = [
         'clobber',
@@ -1125,12 +1126,19 @@ class B2GBuild(LocalesMixin, PurgeMixin,
         self.set_buildbot_property("hashType", "sha512")
         self.set_buildbot_property("completeMarSize", self.query_filesize(marfile))
         self.set_buildbot_property("completeMarHash", self.query_sha512sum(marfile))
         self.set_buildbot_property("completeMarUrl", mar_url)
         self.set_buildbot_property("isOSUpdate", self.isOSUpdate)
 
         self.submit_balrog_updates(product='b2g')
 
+    @PostScriptRun
+    def _remove_userconfig(self):
+        self.info("Cleanup .userconfig file.")
+        dirs = self.query_abs_dirs()
+        userconfig_path = os.path.join(dirs["work_dir"], ".userconfig")
+        os.remove(userconfig_path)
+
 # main {{{1
 if __name__ == '__main__':
     myScript = B2GBuild()
     myScript.run_and_exit()