Bug 939719 - stop packaging tests.jar up during a build. r=ted
authorJoel Maher <jmaher@mozilla.com>
Mon, 18 Nov 2013 13:38:37 -0500
changeset 170733 f56094c770769514f1f14a1bf4685b6855c985fe
parent 170732 bd3fb665acfc4e371603730bdebce857749ae948
child 170734 992194d6631f6f5c5839a4981fbf1de20a2c09f6
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs939719
milestone28.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 939719 - stop packaging tests.jar up during a build. r=ted
docshell/test/chrome/test_bug456980.xul
docshell/test/chrome/test_bug608669.xul
testing/mochitest/Makefile.in
testing/mochitest/runtests.py
testing/mochitest/runtestsremote.py
testing/testsuite-targets.mk
--- a/docshell/test/chrome/test_bug456980.xul
+++ b/docshell/test/chrome/test_bug456980.xul
@@ -15,18 +15,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   <!-- test results are displayed in the html:body -->
   <body xmlns="http://www.w3.org/1999/xhtml">
   <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=456980"
      target="_blank">Mozilla Bug 396519</a>
   </body>
 
   <!-- test code goes here -->
   <script type="application/javascript"><![CDATA[
-    SimpleTest.expectAssertions(1);
-
     SimpleTest.waitForExplicitFinish();
 
     addLoadEvent(function() {
       window.open("bug113934_window.xul?chrome", "bug456980",
                   "chrome,width=800,height=800");
     });
 
   ]]></script>
--- a/docshell/test/chrome/test_bug608669.xul
+++ b/docshell/test/chrome/test_bug608669.xul
@@ -34,19 +34,17 @@ function setCachePref(enabled) {
     gOrigMaxTotalViewers = undefined;
     try {
       prefBranch.clearUserPref("browser.sessionhistory.cache_subframes");
     } catch (e) { /* Pref didn't exist, meh */ }
   }
 }
 
 
-SimpleTest.expectAssertions(1);
-
-    /** Test for Bug 608669 **/
+/** Test for Bug 608669 **/
 SimpleTest.waitForExplicitFinish();
 
 addLoadEvent(nextTest);
 
 gen = doTest();
 
 function nextTest() {
   gen.next();
--- a/testing/mochitest/Makefile.in
+++ b/testing/mochitest/Makefile.in
@@ -5,19 +5,16 @@
 
 NO_JS_MANIFEST = 1
 MOZ_CHROME_FILE_FORMAT = jar
 DIST_FILES = install.rdf
 
 # Used in install.rdf
 USE_EXTENSION_MANIFEST = 1
 
-# we turn this off for UNIVERSAL_BINARY
-CHROME_JAR = 1
-
 include $(topsrcdir)/config/rules.mk
 # We're installing to _tests/testing/mochitest, so this is the depth
 # necessary for relative objdir paths.
 TARGET_DEPTH = ../../..
 include $(topsrcdir)/build/automation-build.mk
 
 # files that get copied into $objdir/_tests/
 _SERV_FILES = 	\
@@ -166,35 +163,16 @@ TEST_HARNESS_PLUGINS := \
   $(DLL_PREFIX)nptest$(DLL_SUFFIX) \
   $(DLL_PREFIX)npsecondtest$(DLL_SUFFIX)
 endif
 
 # Rules for staging the necessary harness bits for a test package
 PKG_STAGE = $(DIST)/test-package-stage
 DIST_BIN = $(DIST)/bin
 
-PKG_CHROMEJAR = $(PKG_STAGE)/mochitest/content/
-
-ifdef CHROME_JAR
-stage-chromejar:
-	$(NSINSTALL) -D $(PKG_CHROMEJAR)
-	cp -RL $(DEPTH)/_tests/testing/mochitest/browser $(PKG_CHROMEJAR)
-	cp -RL $(DEPTH)/_tests/testing/mochitest/chrome $(PKG_CHROMEJAR)
-ifdef MOZ_METRO
-	cp -RL $(DEPTH)/_tests/testing/mochitest/metro $(PKG_CHROMEJAR)
-endif
-ifdef ACCESSIBILITY
-	cp -RL $(DEPTH)/_tests/testing/mochitest/a11y $(PKG_CHROMEJAR)
-endif
-	(cd $(PKG_STAGE)/mochitest && zip -rq tests.jar content/)
-	@(rm -rf $(PKG_CHROMEJAR))
-
-stage-package: stage-chromejar
-endif
-
 $(_DEST_DIR):
 	$(NSINSTALL) -D $@
 
 stage-package:
 	$(NSINSTALL) -D $(PKG_STAGE)/mochitest && $(NSINSTALL) -D $(PKG_STAGE)/bin/plugins && $(NSINSTALL) -D $(DIST)/plugins
 	cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/mochitest
 	(cd $(DEPTH)/_tests/testing/mochitest/ && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/mochitest && tar -xf -)
 	@cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/mochitest
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -429,25 +429,16 @@ class MochitestUtilsMixin(object):
       if os.path.isfile(abspath):
         shutil.copy2(abspath, options.profilePath)
       elif os.path.isdir(abspath):
         dest = os.path.join(options.profilePath, os.path.basename(abspath))
         shutil.copytree(abspath, dest)
       else:
         log.warning("runtests.py | Failed to copy %s to profile", abspath)
 
-  def copyTestsJarToProfile(self, options):
-    """ copy tests.jar to the profile directory so we can auto register it in the .xul harness """
-    testsJarFile = os.path.join(SCRIPT_DIR, "tests.jar")
-    if not os.path.isfile(testsJarFile):
-      return False
-
-    shutil.copy2(testsJarFile, options.profilePath)
-    return True
-
   def installChromeJar(self, chrome, options):
     """
       copy mochijar directory to profile as an extension so we have chrome://mochikit for all harness code
     """
     # Write chrome.manifest.
     with open(os.path.join(options.profilePath, "extensions", "staged", "mochikit@mozilla.org", "chrome.manifest"), "a") as mfile:
       mfile.write(chrome)
 
@@ -467,28 +458,23 @@ toolbarpalette {
 }
 toolbar#nav-bar {
   background-image: none !important;
 }
 """
     with open(os.path.join(options.profilePath, "userChrome.css"), "a") as chromeFile:
       chromeFile.write(chrome)
 
-    # Call copyTestsJarToProfile(), Write tests.manifest.
     manifest = os.path.join(options.profilePath, "tests.manifest")
     with open(manifest, "w") as manifestFile:
-      if self.copyTestsJarToProfile(options):
-        # Register tests.jar.
-        manifestFile.write("content mochitests jar:tests.jar!/content/\n");
-      else:
-        # Register chrome directory.
-        chrometestDir = os.path.abspath(".") + "/"
-        if mozinfo.isWin:
-          chrometestDir = "file:///" + chrometestDir.replace("\\", "/")
-        manifestFile.write("content mochitests %s contentaccessible=yes\n" % chrometestDir)
+      # Register chrome directory.
+      chrometestDir = os.path.abspath(".") + "/"
+      if mozinfo.isWin:
+        chrometestDir = "file:///" + chrometestDir.replace("\\", "/")
+      manifestFile.write("content mochitests %s contentaccessible=yes\n" % chrometestDir)
 
       if options.testingModulesDir is not None:
         manifestFile.write("resource testing-common file:///%s\n" %
           options.testingModulesDir)
 
     # Call installChromeJar().
     if not os.path.isdir(os.path.join(SCRIPT_DIR, self.jarDir)):
       log.testFail("invalid setup: missing mochikit extension")
--- a/testing/mochitest/runtestsremote.py
+++ b/testing/mochitest/runtestsremote.py
@@ -342,20 +342,16 @@ class MochiRemote(Mochitest):
 
         # we do not need this for robotium based tests, lets save a LOT of time
         if options.robocopIni:
             shutil.rmtree(os.path.join(options.profilePath, 'webapps'))
             shutil.rmtree(os.path.join(options.profilePath, 'extensions', 'staged', 'mochikit@mozilla.org'))
             shutil.rmtree(os.path.join(options.profilePath, 'extensions', 'staged', 'worker-test@mozilla.org'))
             shutil.rmtree(os.path.join(options.profilePath, 'extensions', 'staged', 'workerbootstrap-test@mozilla.org'))
             os.remove(os.path.join(options.profilePath, 'userChrome.css'))
-            if os.path.exists(os.path.join(options.profilePath, 'tests.jar')):
-                os.remove(os.path.join(options.profilePath, 'tests.jar'))
-            if os.path.exists(os.path.join(options.profilePath, 'tests.manifest')):
-                os.remove(os.path.join(options.profilePath, 'tests.manifest'))
 
         try:
             self._dm.pushDir(options.profilePath, self.remoteProfile)
         except devicemanager.DMError:
             log.error("Automation Error: Unable to copy profile to device.")
             raise
 
         options.profilePath = self.remoteProfile
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -428,19 +428,16 @@ else
 # This staging area has been built for us by universal/flight.mk
 PKG_STAGE = $(DIST)/universal/test-package-stage
 endif
 
 package-tests:
 	@rm -f "$(DIST)/$(PKG_PATH)$(TEST_PACKAGE)"
 ifndef UNIVERSAL_BINARY
 	$(NSINSTALL) -D $(DIST)/$(PKG_PATH)
-else
-	#building tests.jar (bug 543800) fails on unify, so we build tests.jar after unify is run
-	$(MAKE) -C $(DEPTH)/testing/mochitest stage-chromejar PKG_STAGE=$(DIST)/universal
 endif
 	find $(PKG_STAGE) -name "*.pyc" -exec rm {} \;
 	cd $(PKG_STAGE) && \
 	  zip -rq9D "$(abspath $(DIST)/$(PKG_PATH)$(TEST_PACKAGE))" \
 	  * -x \*/.mkdir.done
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 package-tests: stage-android