Bug 917999 - Part 3 - Split tests into harness specific zips.;r=ted
authorChris Manchester <cmanchester@mozilla.com>
Mon, 29 Jun 2015 11:16:50 -0700
changeset 282387 7656864dc35b44889baa3dd4a385012b599e42f2
parent 282386 319ea136708988111841508a5844b8d86cb8522d
child 282388 a7a6d91116abb5c244b46793301d0e0271056603
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs917999
milestone42.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 917999 - Part 3 - Split tests into harness specific zips.;r=ted
build/gen_test_packages_manifest.py
testing/config/mozharness/android_arm_4_3_config.py
testing/config/mozharness/android_panda_config.py
testing/config/mozharness/b2g_emulator_config.py
testing/config/mozharness/linux_config.py
testing/config/mozharness/mac_config.py
testing/config/mozharness/windows_config.py
testing/testsuite-targets.mk
toolkit/mozapps/installer/package-name.mk
toolkit/mozapps/installer/upload-files.mk
--- a/build/gen_test_packages_manifest.py
+++ b/build/gen_test_packages_manifest.py
@@ -12,19 +12,25 @@ ALL_HARNESSES = [
     'common', # Harnesses without a specific package will look here.
     'mochitest',
     'reftest',
     'webapprt',
     'xpcshell',
     'cppunittest',
     'jittest',
     'mozbase',
+    'web-platform',
 ]
 
 PACKAGE_SPECIFIED_HARNESSES = [
+    'cppunittest',
+    'mochitest',
+    'reftest',
+    'xpcshell',
+    'web-platform',
 ]
 
 
 def parse_args():
     parser = ArgumentParser(description='Generate a test_packages.json file to tell automation which harnesses require which test packages.')
     parser.add_argument("--common", required=True,
                         action="store", dest="tests_common",
                         help="Name of the \"common\" archive, a package to be used by all harnesses.")
--- a/testing/config/mozharness/android_arm_4_3_config.py
+++ b/testing/config/mozharness/android_arm_4_3_config.py
@@ -94,17 +94,17 @@ config = {
                 "--symbols-path=%(symbols_path)s",
                 "--manifest=tests/xpcshell.ini",
                 "--log-raw=%(raw_log_file)s",
                 "--total-chunks=3",
             ],
         },
         "cppunittest": {
             "run_filename": "remotecppunittests.py",
-            "testsdir": "cppunittests",
+            "testsdir": "cppunittest",
             "options": [
                 "--symbols-path=%(symbols_path)s",
                 "--xre-path=%(xre_path)s",
                 "--dm_trans=adb",
                 "--localBinDir=../bin",
                 "--apk=%(installer_path)s",
                 ".",
             ],
--- a/testing/config/mozharness/android_panda_config.py
+++ b/testing/config/mozharness/android_panda_config.py
@@ -10,17 +10,17 @@ config = {
                 "--xre-path=tests/bin",
                 "--dm_trans=sut",
                 "--deviceIP=%(device_ip)s",
                 "--localBinDir=../tests/bin",
                 "--apk=%(apk_path)s",
                 "--skip-manifest=../tests/cppunittests/android_cppunittest_manifest.txt"
             ],
             "run_filename": "remotecppunittests.py",
-            "testsdir": "cppunittests"
+            "testsdir": "cppunittest"
         },
         "crashtest": {
             "options": [
                 "--deviceIP=%(device_ip)s",
                 "--xre-path=../hostutils/xre",
                 "--utility-path=../hostutils/bin",
                 "--app=%(app_name)s",
                 "--ignore-window-size",
--- a/testing/config/mozharness/b2g_emulator_config.py
+++ b/testing/config/mozharness/b2g_emulator_config.py
@@ -11,17 +11,17 @@ config = {
                 "--xre-path=%(xre_path)s",
                 "--addEnv",
                 "LD_LIBRARY_PATH=/vendor/lib:/system/lib:/system/b2g",
                 "--with-b2g-emulator=%(b2gpath)s",
                 "--skip-manifest=b2g_cppunittest_manifest.txt",
                 "."
             ],
             "run_filename": "remotecppunittests.py",
-            "testsdir": "cppunittests"
+            "testsdir": "cppunittest"
         },
         "crashtest": {
             "options": [
                 "--adbpath=%(adbpath)s",
                 "--b2gpath=%(b2gpath)s",
                 "--emulator=%(emulator)s",
                 "--emulator-res=800x1000",
                 "--logdir=%(logcat_dir)s",
--- a/testing/config/mozharness/linux_config.py
+++ b/testing/config/mozharness/linux_config.py
@@ -5,17 +5,17 @@
 config = {
     "suite_definitions": {
         "cppunittest": {
             "options": [
                 "--symbols-path=%(symbols_path)s",
                 "--xre-path=%(abs_app_dir)s"
             ],
             "run_filename": "runcppunittests.py",
-            "testsdir": "cppunittests"
+            "testsdir": "cppunittest"
         },
         "jittest": {
             "options": [
                 "tests/bin/js",
                 "--no-slow",
                 "--no-progress",
                 "--format=automation",
                 "--jitflags=all"
--- a/testing/config/mozharness/mac_config.py
+++ b/testing/config/mozharness/mac_config.py
@@ -5,17 +5,17 @@
 config = {
     "suite_definitions": {
         "cppunittest": {
             "options": [
                 "--symbols-path=%(symbols_path)s",
                 "--xre-path=%(abs_app_dir)s"
             ],
             "run_filename": "runcppunittests.py",
-            "testsdir": "cppunittests"
+            "testsdir": "cppunittest"
         },
         "jittest": {
             "options": [
                 "tests/bin/js",
                 "--no-slow",
                 "--no-progress",
                 "--format=automation",
                 "--jitflags=all"
--- a/testing/config/mozharness/windows_config.py
+++ b/testing/config/mozharness/windows_config.py
@@ -5,17 +5,17 @@
 config = {
     "suite_definitions": {
         "cppunittest": {
             "options": [
                 "--symbols-path=%(symbols_path)s",
                 "--xre-path=%(abs_app_dir)s"
             ],
             "run_filename": "runcppunittests.py",
-            "testsdir": "cppunittests"
+            "testsdir": "cppunittest"
         },
         "jittest": {
             "options": [
                 "tests/bin/js",
                 "--no-slow",
                 "--no-progress",
                 "--format=automation",
                 "--jitflags=all"
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -411,29 +411,47 @@ package-tests: \
 ifdef MOZ_WEBRTC
 package-tests: stage-steeplechase
 endif
 else
 # This staging area has been built for us by universal/flight.mk
 PKG_STAGE = $(DIST)/universal/test-stage
 endif
 
+TEST_PKGS := \
+  cppunittest \
+  mochitest \
+  reftest \
+  xpcshell \
+  web-platform \
+  $(NULL)
+
+PKG_ARG = --$(1) $(PKG_BASENAME).$(1).tests.zip
+
 test-packages-manifest:
 	@rm -f $(MOZ_TEST_PACKAGES_FILE)
-	$(PYTHON) $(topsrcdir)/build/gen_test_packages_manifest.py --common $(TEST_PACKAGE) --jsshell $(JSSHELL_NAME) --dest-file $(MOZ_TEST_PACKAGES_FILE)
+	$(PYTHON) $(topsrcdir)/build/gen_test_packages_manifest.py \
+      --jsshell $(JSSHELL_NAME) \
+      --dest-file $(MOZ_TEST_PACKAGES_FILE) \
+      $(call PKG_ARG,common) \
+      $(foreach pkg,$(TEST_PKGS),$(call PKG_ARG,$(pkg)))
 
 package-tests:
 	@rm -f '$(DIST)/$(PKG_PATH)$(TEST_PACKAGE)'
 ifndef UNIVERSAL_BINARY
 	$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
 endif
+# Exclude harness specific directories when generating the common zip.
 	$(MKDIR) -p $(abspath $(DIST))/$(PKG_PATH) && \
 	cd $(PKG_STAGE) && \
 	  zip -rq9D '$(abspath $(DIST))/$(PKG_PATH)$(TEST_PACKAGE)' \
-	  * -x \*/.mkdir.done \*.pyc
+	  * -x \*/.mkdir.done \*.pyc $(foreach name,$(TEST_PKGS),$(name)\*) && \
+	$(foreach name,$(TEST_PKGS),rm -f '$(DIST)/$(PKG_PATH)$(PKG_BASENAME).'$(name)'.tests.zip' && \
+                                zip -rq9D '$(abspath $(DIST))/$(PKG_PATH)$(PKG_BASENAME).'$(name)'.tests.zip' \
+                                $(name) -x \*/.mkdir.done \*.pyc ;)
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 package-tests: stage-android
 package-tests: stage-instrumentation-tests
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
 package-tests: stage-b2g
@@ -505,34 +523,34 @@ CPP_UNIT_TEST_BINS=$(wildcard $(DIST)/cp
 
 ifdef OBJCOPY
 ifndef PKG_SKIP_STRIP
 STRIP_CPP_TESTS := 1
 endif
 endif
 
 stage-cppunittests: make-stage-dir
-	$(NSINSTALL) -D $(PKG_STAGE)/cppunittests
+	$(NSINSTALL) -D $(PKG_STAGE)/cppunittest
 ifdef STRIP_CPP_TESTS
-	$(foreach bin,$(CPP_UNIT_TEST_BINS),$(OBJCOPY) $(or $(STRIP_FLAGS),--strip-unneeded) $(bin) $(bin:$(DIST)/%=$(PKG_STAGE)/%);)
+	$(foreach bin,$(CPP_UNIT_TEST_BINS),$(OBJCOPY) $(or $(STRIP_FLAGS),--strip-unneeded) $(bin) $(bin:$(DIST)/cppunittests/%=$(PKG_STAGE)/cppunittest/%);)
 else
-	cp -RL $(DIST)/cppunittests $(PKG_STAGE)
+	cp -RL $(CPP_UNIT_TEST_BINS) $(PKG_STAGE)/cppunittest
 endif
-	cp $(topsrcdir)/testing/runcppunittests.py $(PKG_STAGE)/cppunittests
-	cp $(topsrcdir)/testing/remotecppunittests.py $(PKG_STAGE)/cppunittests
-	cp $(topsrcdir)/testing/cppunittest.ini $(PKG_STAGE)/cppunittests
-	cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/cppunittests
+	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)/cppunittests
-	cp $(topsrcdir)/startupcache/test/TestStartupCacheTelemetry.manifest $(PKG_STAGE)/cppunittests
+	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)/cppunittests/jsapi-tests$(BIN_SUFFIX)
+	$(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)/cppunittests
+	cp -RL $(DIST)/bin/jsapi-tests$(BIN_SUFFIX) $(PKG_STAGE)/cppunittest
 endif
 
 stage-jittest: make-stage-dir
 	$(NSINSTALL) -D $(PKG_STAGE)/jit-test/tests
 	cp -RL $(topsrcdir)/js/src/jsapi.h $(PKG_STAGE)/jit-test/
 	cp -RL $(topsrcdir)/js/src/jit-test $(PKG_STAGE)/jit-test/
 	cp -RL $(topsrcdir)/js/src/tests/ecma_6 $(PKG_STAGE)/jit-test/tests/
 	cp -RL $(topsrcdir)/js/src/tests/js1_8_5 $(PKG_STAGE)/jit-test/tests/
--- a/toolkit/mozapps/installer/package-name.mk
+++ b/toolkit/mozapps/installer/package-name.mk
@@ -124,17 +124,22 @@ endif # MOZ_PKG_PRETTYNAMES
 # Symbol package naming
 SYMBOL_FULL_ARCHIVE_BASENAME = $(PKG_BASENAME).crashreporter-symbols-full
 SYMBOL_ARCHIVE_BASENAME = $(PKG_BASENAME).crashreporter-symbols
 
 # Code coverage package naming
 CODE_COVERAGE_ARCHIVE_BASENAME = $(PKG_BASENAME).code-coverage-gcno
 
 # Test package naming
-TEST_PACKAGE = $(PKG_BASENAME).tests.zip
+TEST_PACKAGE = $(PKG_BASENAME).common.tests.zip
+CPP_TEST_PACKAGE = $(PKG_BASENAME).cppunittest.tests.zip
+XPC_TEST_PACKAGE = $(PKG_BASENAME).xpcshell.tests.zip
+MOCHITEST_PACKAGE = $(PKG_BASENAME).mochitest.tests.zip
+REFTEST_PACKAGE = $(PKG_BASENAME).reftest.tests.zip
+WP_TEST_PACKAGE = $(PKG_BASENAME).web-platform.tests.zip
 
 ifneq (,$(wildcard $(DIST)/bin/application.ini))
 BUILDID = $(shell $(PYTHON) $(MOZILLA_DIR)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID)
 else
 BUILDID = $(shell $(PYTHON) $(MOZILLA_DIR)/config/printconfigsetting.py $(DIST)/bin/platform.ini Build BuildID)
 endif
 
 ifndef INCLUDED_RCS_MK
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -725,16 +725,21 @@ endif
 
 UPLOAD_FILES= \
   $(call QUOTED_WILDCARD,$(DIST)/$(PACKAGE)) \
   $(call QUOTED_WILDCARD,$(INSTALLER_PACKAGE)) \
   $(call QUOTED_WILDCARD,$(DIST)/$(COMPLETE_MAR)) \
   $(call QUOTED_WILDCARD,$(DIST)/$(LANGPACK)) \
   $(call QUOTED_WILDCARD,$(wildcard $(DIST)/$(PARTIAL_MAR))) \
   $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(TEST_PACKAGE)) \
+  $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(CPP_TEST_PACKAGE)) \
+  $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(XPC_TEST_PACKAGE)) \
+  $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(MOCHITEST_PACKAGE)) \
+  $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(REFTEST_PACKAGE)) \
+  $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(WP_TEST_PACKAGE)) \
   $(call QUOTED_WILDCARD,$(DIST)/$(PKG_PATH)$(SYMBOL_ARCHIVE_BASENAME).zip) \
   $(call QUOTED_WILDCARD,$(DIST)/$(SDK)) \
   $(call QUOTED_WILDCARD,$(MOZ_SOURCESTAMP_FILE)) \
   $(call QUOTED_WILDCARD,$(MOZ_BUILDINFO_FILE)) \
   $(call QUOTED_WILDCARD,$(MOZ_MOZINFO_FILE)) \
   $(call QUOTED_WILDCARD,$(MOZ_TEST_PACKAGES_FILE)) \
   $(call QUOTED_WILDCARD,$(PKG_JSSHELL)) \
   $(if $(UPLOAD_EXTRA_FILES), $(foreach f, $(UPLOAD_EXTRA_FILES), $(wildcard $(DIST)/$(f))))