Bug 1208320 - Produce common tests archive via Python; r?glandium draft
authorGregory Szorc <gps@mozilla.com>
Fri, 25 Sep 2015 10:52:58 -0400
changeset 296511 5701c77d90a7a0c04a34d10e27fcd70c60435682
parent 296510 405ef4646211be66dbe7351f3ef4d2ecbda93efd
child 296512 1e134f34a3505bf3ce811952a9a1effe65bee1bb
push id5846
push usergszorc@mozilla.com
push dateFri, 25 Sep 2015 21:20:39 +0000
reviewersglandium
bugs1208320
milestone44.0a1
Bug 1208320 - Produce common tests archive via Python; r?glandium This doesn't change I/O or copy behavior at all. But it does remove a one-off make rule.
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
@@ -15,16 +15,31 @@ import os
 import sys
 
 from mozpack.files import FileFinder
 from mozpack.mozjar import JarWriter
 import mozpack.path as mozpath
 
 
 ARCHIVE_FILES = {
+    'common': [
+        {
+            'source': 'stage',
+            'base': '',
+            'pattern': '**',
+            'ignore': [
+                'cppunittest/**',
+                'mochitest/**',
+                'reftest/**',
+                'talos/**',
+                'web-platform/**',
+                'xpcshell/**',
+            ],
+        },
+    ],
     'mochitest': [
         {
             'source': 'topobjdir',
             'base': '_tests/testing',
             'pattern': 'mochitest/**',
         },
         {
             'source': 'stage',
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -393,16 +393,17 @@ stage-all: stage-steeplechase
 endif
 
 TEST_PKGS := \
   cppunittest \
   reftest \
   $(NULL)
 
 PYTHON_TEST_PKGS := \
+  common \
   mochitest \
   talos \
   web-platform \
   xpcshell \
   $(NULL)
 
 ALL_TEST_PKGS := $(TEST_PKGS) $(PYTHON_TEST_PKGS)
 
@@ -435,22 +436,16 @@ package-tests-mozharness: package-tests-
 	$(call py_action,test_archive, \
 		mozharness \
 		$(topsrcdir) \
 		$(abspath $(DEPTH)) \
 		$(abspath $(PKG_STAGE)) \
 		$(abspath $(DIST))/$(PKG_PATH)/mozharness.zip)
 package-tests: package-tests-mozharness
 
-package-tests-common: stage-all package-tests-prepare-dest
-	cd $(abspath $(PKG_STAGE)) && \
-	  zip -rq9D '$(abspath $(DIST))/$(PKG_PATH)$(TEST_PACKAGE)' \
-	  * -x \*/.mkdir.done \*.pyc $(foreach name,$(ALL_TEST_PKGS),$(name)\*)
-package-tests: package-tests-common
-
 define package_archive
 package-tests-$(1): stage-all package-tests-prepare-dest
 	rm -f '$$(DIST)/$$(PKG_PATH)$$(PKG_BASENAME).$(1).tests.zip' && \
 		cd $$(abspath $(PKG_STAGE)) && \
 		zip -rq9D '$$(abspath $$(DIST))/$$(PKG_PATH)$$(PKG_BASENAME).$(1).tests.zip' \
 		$(1) -x \*/.mkdir.done \*.pyc ;
 .PHONY += package-tests-$(1)
 package-tests: package-tests-$(1)