Skip to content

Instantly share code, notes, and snippets.

@rail
Created July 2, 2015 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rail/b7197e5d4c584fd8ade1 to your computer and use it in GitHub Desktop.
Save rail/b7197e5d4c584fd8ade1 to your computer and use it in GitHub Desktop.
mozharness/mozilla/building/buildbase.py | 27 ++++++---------------------
1 file changed, 6 insertions(+), 21 deletions(-)
diff --git a/mozharness/mozilla/building/buildbase.py b/mozharness/mozilla/building/buildbase.py
index f71a878..5d711b8 100755
--- a/mozharness/mozilla/building/buildbase.py
+++ b/mozharness/mozilla/building/buildbase.py
@@ -1691,55 +1691,40 @@ or run without that action (ie: --no-{action})"
def postflight_build(self, console_output=True):
"""grabs properties from post build and calls ccache -s"""
self.generate_build_props(console_output=console_output,
halt_on_failure=True)
if self.config.get('enable_ccache'):
self._ccache_s()
- def check_run_command_m(self, *args, **kwargs):
- rc = self.run_command_m(*args, **kwargs)
- if rc != 0:
- self.return_code = self.worst_level(
- EXIT_STATUS_DICT[TBPL_FAILURE], self.return_code,
- AUTOMATION_EXIT_CODES[::-1]
- )
- self.fatal("Fatal error running %s %s." % (args, kwargs))
-
def preflight_package_source(self):
# Make sure to have an empty .mozconfig. Removing it is not enough,
# because MOZ_OBJDIR is not used in this case
- self._create_empty_mozconfig()
-
- def _create_empty_mozconfig(self):
- """Create an empty mozconfig file"""
- self.log("creating an empty mozconfig...")
- with open(os.path.join(self.query_abs_dirs()['abs_src_dir'],
- '.mozconfig'), "w"):
- pass
+ self._touch_file(os.path.join(self.query_abs_dirs()['abs_src_dir'],
+ '.mozconfig'))
def package_source(self):
"""generates source archives and uploads them"""
env = self.query_build_env()
env.update(self.query_mach_build_env())
python = self.query_exe('python2.7')
- self.check_run_command_m(
+ self.run_command_m(
command=[python, 'mach', '--log-no-times', 'configure'],
cwd=self.query_abs_dirs()['abs_src_dir'],
- env=env, output_timeout=60*3,
+ env=env, output_timeout=60*3, halt_on_failure=True,
)
- self.check_run_command_m(
+ self.run_command_m(
command=[
'make', 'source-package', 'hg-bundle',
'HG_BUNDLE_REVISION=%s' % self.query_revision(),
],
cwd=self.query_abs_dirs()['abs_obj_dir'],
- env=env, output_timeout=60*45
+ env=env, output_timeout=60*45, halt_on_failure=True,
)
def check_test(self):
c = self.config
dirs = self.query_abs_dirs()
env = self.query_build_env()
env.update(self.query_check_test_env())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment