Bug 1208320 - Do not stage some C++ unit test support files before archiving; r=glandium
authorGregory Szorc <gps@mozilla.com>
Wed, 30 Sep 2015 17:41:46 -0700
changeset 265427 2af206d9404d23cfbf53a97b1cb3094d6b95fbe7
parent 265426 7bf7734c34bf6bccfd0a65db82db71d2d9dc4482
child 265428 2d5a9234f7804a5898671dea4cdbfc8c59f2cb2c
push id65931
push usergszorc@mozilla.com
push dateThu, 01 Oct 2015 05:36:32 +0000
treeherdermozilla-inbound@4a19c58da592 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1208320
milestone44.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 1208320 - Do not stage some C++ unit test support files before archiving; r=glandium Won't impact performance much. But fewer make foo makes porting the C++ unit tests (which are the largest remaining tests) to the Python archiver easier to grok. This conversion did change behavior slightly. Previously, startup cache files weren't being packaged if startup cache was disabled. Now, we always package them since their presence in the test archive should be harmless. The original change to guard their inclusion in ee82e0ae5488 was probably unnecessary.
python/mozbuild/mozbuild/action/test_archive.py
testing/testsuite-targets.mk
--- a/python/mozbuild/mozbuild/action/test_archive.py
+++ b/python/mozbuild/mozbuild/action/test_archive.py
@@ -97,16 +97,48 @@ ARCHIVE_FILES = {
         },
     ],
     'cppunittest': [
         {
             'source': STAGE,
             'base': '',
             'pattern': 'cppunittest/**',
         },
+        # We don't ship these files if startup cache is disabled, which is
+        # rare. But it shouldn't matter for test archives.
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'startupcache/test',
+            'pattern': 'TestStartupCacheTelemetry.*',
+            'dest': 'cppunittest',
+        },
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'testing',
+            'pattern': 'runcppunittests.py',
+            'dest': 'cppunittest',
+        },
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'testing',
+            'pattern': 'remotecppunittests.py',
+            'dest': 'cppunittest',
+        },
+        {
+            'source': buildconfig.topsrcdir,
+            'base': 'testing',
+            'pattern': 'cppunittest.ini',
+            'dest': 'cppunittest',
+        },
+        {
+            'source': buildconfig.topobjdir,
+            'base': '',
+            'pattern': 'mozinfo.json',
+            'dest': 'cppunittest',
+        },
     ],
     'mochitest': [
         {
             'source': buildconfig.topobjdir,
             'base': '_tests/testing',
             'pattern': 'mochitest/**',
         },
         {
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -509,24 +509,16 @@ endif
 
 stage-cppunittests: make-stage-dir
 	$(NSINSTALL) -D $(PKG_STAGE)/cppunittest
 ifdef STRIP_CPP_TESTS
 	$(foreach bin,$(CPP_UNIT_TEST_BINS),$(OBJCOPY) $(or $(STRIP_FLAGS),--strip-unneeded) $(bin) $(bin:$(DIST)/cppunittests/%=$(PKG_STAGE)/cppunittest/%);)
 else
 	cp -RL $(CPP_UNIT_TEST_BINS) $(PKG_STAGE)/cppunittest
 endif
-	cp $(topsrcdir)/testing/runcppunittests.py $(PKG_STAGE)/cppunittest
-	cp $(topsrcdir)/testing/remotecppunittests.py $(PKG_STAGE)/cppunittest
-	cp $(topsrcdir)/testing/cppunittest.ini $(PKG_STAGE)/cppunittest
-	cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/cppunittest
-ifeq ($(MOZ_DISABLE_STARTUPCACHE),)
-	cp $(topsrcdir)/startupcache/test/TestStartupCacheTelemetry.js $(PKG_STAGE)/cppunittest
-	cp $(topsrcdir)/startupcache/test/TestStartupCacheTelemetry.manifest $(PKG_STAGE)/cppunittest
-endif
 ifdef STRIP_CPP_TESTS
 	$(OBJCOPY) $(or $(STRIP_FLAGS),--strip-unneeded) $(DIST)/bin/jsapi-tests$(BIN_SUFFIX) $(PKG_STAGE)/cppunittest/jsapi-tests$(BIN_SUFFIX)
 else
 	cp -RL $(DIST)/bin/jsapi-tests$(BIN_SUFFIX) $(PKG_STAGE)/cppunittest
 endif
 
 stage-steeplechase: make-stage-dir
 	$(NSINSTALL) -D $(PKG_STAGE)/steeplechase/