Bug 1240149 - Build system changes necessary to run linux artifact builds in automation. draft
authorChris Manchester <cmanchester@mozilla.com>
Thu, 11 Feb 2016 18:46:46 -0800
changeset 331714 f4aa5dd96a3a339fc9f4d2bc75b023b6783d4d37
parent 331663 0629918a09ae87808efdda432d7852371ba37db6
child 331715 bde532c8d35c3a7b7e00238c3956e994eafb94f6
push id11057
push usercmanchester@mozilla.com
push dateThu, 18 Feb 2016 01:24:03 +0000
bugs1240149
milestone47.0a1
Bug 1240149 - Build system changes necessary to run linux artifact builds in automation. MozReview-Commit-ID: CJ0CTBtklCs
browser/config/mozconfigs/linux64/artifact
moz.build
python/mozbuild/mozbuild/mach_commands.py
testing/testsuite-targets.mk
toolkit/locales/Makefile.in
toolkit/mozapps/installer/packager.py
new file mode 100644
--- /dev/null
+++ b/browser/config/mozconfigs/linux64/artifact
@@ -0,0 +1,6 @@
+MOZ_AUTOMATION_BUILD_SYMBOLS=0
+MOZ_AUTOMATION_L10N_CHECK=0
+
+. "$topsrcdir/browser/config/mozconfigs/linux64/nightly"
+
+ac_add_options --enable-artifact-builds
--- a/moz.build
+++ b/moz.build
@@ -71,14 +71,16 @@ if CONFIG['COMPILE_ENVIRONMENT']:
             'config/external/nss',
         ]
 
     if CONFIG['BUILD_CTYPES']:
         DIRS += ['config/external/ffi']
     if CONFIG['USE_ICU']:
         DIRS += ['config/external/icu']
     DIRS += ['js/src']
+else:
+    TEST_DIRS += ['js/src/tests']
 
 if not CONFIG['JS_STANDALONE'] and CONFIG['MOZ_BUILD_APP']:
     # Bring in the configuration for the configured application.
     include('/' + CONFIG['MOZ_BUILD_APP'] + '/app.mozbuild')
 
 include('build/templates.mozbuild')
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1468,21 +1468,37 @@ class PackageFrontend(MachCommandBase):
         Never build libxul again!
 
         '''
         pass
 
     def _set_log_level(self, verbose):
         self.log_manager.terminal_handler.setLevel(logging.INFO if not verbose else logging.DEBUG)
 
+    def _install_pip_package(self, package):
+        if os.environ.get('MOZ_AUTOMATION'):
+            self.virtualenv_manager._run_pip([
+                'install',
+                package,
+                '--no-index',
+                '--find-links',
+                'http://pypi.pub.build.mozilla.org/pub',
+                '--trusted-host',
+                'pypi.pub.build.mozilla.org',
+            ])
+            return
+        self.virtualenv_manager.install_pip_package(package)
+
     def _make_artifacts(self, tree=None, job=None):
         self._activate_virtualenv()
-        self.virtualenv_manager.install_pip_package('pylru==1.0.9')
-        self.virtualenv_manager.install_pip_package('taskcluster==0.0.32')
-        self.virtualenv_manager.install_pip_package('mozregression==1.0.2')
+
+        for package in ('pylru==1.0.9',
+                        'taskcluster==0.0.32',
+                        'mozregression==1.0.2'):
+            self._install_pip_package(package)
 
         state_dir = self._mach_context.state_dir
         cache_dir = os.path.join(state_dir, 'package-frontend')
 
         try:
             os.makedirs(cache_dir)
         except OSError as e:
             if e.errno != errno.EEXIST:
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -258,25 +258,28 @@ stage-all: \
   stage-config \
   stage-mach \
   stage-extensions \
   stage-mochitest \
   stage-xpcshell \
   stage-jstests \
   stage-jetpack \
   stage-marionette \
-  stage-cppunittests \
   stage-luciddream \
   test-packages-manifest \
   test-packages-manifest-tc \
   $(NULL)
 ifdef MOZ_WEBRTC
 stage-all: stage-steeplechase
 endif
 
+ifdef COMPILE_ENVIRONMENT
+stage-all: stage-cppunittests
+endif
+
 TEST_PKGS := \
   common \
   cppunittest \
   mochitest \
   reftest \
   talos \
   web-platform \
   xpcshell \
--- a/toolkit/locales/Makefile.in
+++ b/toolkit/locales/Makefile.in
@@ -23,17 +23,19 @@ libs-%:
 # like regular chrome code
 chrome-%:
 	@$(MAKE) -C $(DEPTH)/netwerk/locales/ chrome AB_CD=$*
 	@$(MAKE) -C $(DEPTH)/dom/locales/ chrome AB_CD=$*
 	@$(MAKE) -C $(DEPTH)/security/manager/locales/ chrome AB_CD=$*
 	@$(MAKE) chrome AB_CD=$*
 
 libs:: update.locale
+ifneq (,$(wildcard $(FINAL_TARGET)))
 	sed -e 's/%AB_CD%/$(AB_CD)/' $< > $(FINAL_TARGET)/update.locale
+endif
 
 ifdef MOZ_CRASHREPORTER
 libs:: crashreporter.ini
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/crashreporter.app/Contents/Resources
 else
 	$(SYSINSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
 endif
--- a/toolkit/mozapps/installer/packager.py
+++ b/toolkit/mozapps/installer/packager.py
@@ -358,17 +358,17 @@ def main():
             removals_in = StringIO(open(args.removals).read())
             removals_in.name = args.removals
             removals = RemovedFiles(copier)
             preprocess(removals_in, removals, defines)
             copier.add(mozpath.join(respath, 'removed-files'), removals)
 
     # shlibsign libraries
     if launcher.can_launch():
-        if not mozinfo.isMac:
+        if not mozinfo.isMac and not buildconfig.substs.get('MOZ_ARTIFACT_BUILDS'):
             for lib in SIGN_LIBS:
                 libbase = mozpath.join(respath, '%s%s') \
                     % (buildconfig.substs['DLL_PREFIX'], lib)
                 libname = '%s%s' % (libbase, buildconfig.substs['DLL_SUFFIX'])
                 if copier.contains(libname):
                     copier.add(libbase + '.chk',
                                LibSignFile(os.path.join(args.destination,
                                                         libname)))