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 286640 2af206d9404d23cfbf53a97b1cb3094d6b95fbe7
parent 286639 7bf7734c34bf6bccfd0a65db82db71d2d9dc4482
child 286641 2d5a9234f7804a5898671dea4cdbfc8c59f2cb2c
push id8654
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:48:40 +0000
treeherdermozilla-aurora@bc4551debe17 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1208320
milestone44.0a1
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/