Bug 1037482 - Move TESTING_JS_MODULES to moz.build, r=Standard8
authorJoshua Cranmer <Pidgeot18@gmail.com>
Fri, 11 Jul 2014 14:07:52 -0500
changeset 20495 49e689a2bc7811e63720ef47bcf3db4ef139e255
parent 20494 fda75855a38264ff532a989ba02646e41a619747
child 20496 52c0ebf9fae372735c32091da1f8bc7ad0511d7a
push id1209
push usermbanner@mozilla.com
push dateTue, 02 Sep 2014 16:59:36 +0000
treeherdercomm-beta@842e0fd167ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs1037482
Bug 1037482 - Move TESTING_JS_MODULES to moz.build, r=Standard8
chat/modules/Makefile.in
chat/modules/moz.build
mailnews/Makefile.in
mailnews/moz.build
deleted file mode 100644
--- a/chat/modules/Makefile.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-DEPTH		= @DEPTH@
-topsrcdir	= @top_srcdir@
-srcdir		= @srcdir@
-VPATH		= @srcdir@
-relativesrcdir = @relativesrcdir@
-
-include $(DEPTH)/config/autoconf.mk
-
-ifdef ENABLE_TESTS
-TESTING_JS_MODULES := test/appInfoUtils.jsm
-endif
-
-include $(topsrcdir)/config/rules.mk
--- a/chat/modules/moz.build
+++ b/chat/modules/moz.build
@@ -18,8 +18,11 @@ EXTRA_JS_MODULES += [
     'socket.jsm',
 ]
 
 EXTRA_PP_JS_MODULES += [
     'hiddenWindow.jsm',
     'imTextboxUtils.jsm',
 ]
 
+TESTING_JS_MODULES += [
+    'test/appInfoUtils.jsm',
+]
--- a/mailnews/Makefile.in
+++ b/mailnews/Makefile.in
@@ -7,57 +7,15 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 PREF_JS_EXPORTS = $(srcdir)/mailnews.js
 
-ifdef ENABLE_TESTS
-RESDIR = $(srcdir)/test/resources
-FAKESERVER := $(srcdir)/test/fakeserver
-TESTING_JS_MODULE_DIR = mailnews
-TESTING_JS_MODULES += \
-	$(RESDIR)/IMAPpump.js \
-	$(RESDIR)/localAccountUtils.js \
-	$(RESDIR)/mailTestUtils.js \
-	$(RESDIR)/MockFactory.js \
-	$(RESDIR)/PromiseTestUtils.jsm \
-	$(FAKESERVER)/auth.js \
-	$(FAKESERVER)/imapd.js \
-	$(FAKESERVER)/maild.js \
-	$(FAKESERVER)/nntpd.js \
-	$(FAKESERVER)/pop3d.js \
-	$(FAKESERVER)/smtpd.js \
-	$(NULL)
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 ifdef ENABLE_TESTS
 libs::
 	$(INSTALL) $(wildcard $(srcdir)/test/resources/*.js) $(MOZDEPTH)/_tests/xpcshell/mailnews/resources
 	$(INSTALL) $(wildcard $(srcdir)/test/data/*) $(MOZDEPTH)/_tests/xpcshell/mailnews/data
-
-# We provide an xpcshell-tests target here because the top-level target acts
-# differently to the specific directory one. We want our developers to be able
-# to run "make -C mailnews xpcshell-tests" so we do this short-cut here. This
-# list is kept in the same order as the effective DIRS just so things turn up
-# in the same order as the build.
-
-XPCSHELL_TEST_DIRS = addrbook base compose db/gloda db/msgdb extensions/bayesian-spam-filter extensions/mdn imap import local mime news
-
-xpcshell-tests::
-	$(PYTHON) -u $(MOZILLA_DIR)/config/pythonpath.py \
-	  -I$(MOZDEPTH)/build \
-	  -I$(MOZILLA_DIR)/build -I$(MOZDEPTH)/_tests/mozbase/mozinfo \
-	  $(MOZILLA_SRCDIR)/testing/xpcshell/runxpcshelltests.py \
-	  --symbols-path=$(DIST)/crashreporter-symbols \
-	  --build-info-json=$(MOZDEPTH)/mozinfo.json \
-	  --tests-root-dir=$(testxpcobjdir) \
-          --testing-modules-dir=$(MOZDEPTH)/_tests/modules \
-	  --xunit-file=$(testxpcobjdir)/mailnews/results.xml \
-	  --xunit-suite-name=xpcshell \
-	  $(EXTRA_TEST_ARGS) \
-	  $(LIBXUL_DIST)/bin/xpcshell \
-	  $(foreach dir,$(XPCSHELL_TEST_DIRS),$(testxpcobjdir)/mailnews/$(dir)/test/unit)
 endif
--- a/mailnews/moz.build
+++ b/mailnews/moz.build
@@ -57,8 +57,22 @@ DIRS += [
     'build',
     'import/build',
 ]
 
 DEFINES['OS_ARCH'] = CONFIG['OS_ARCH']
 DEFINES['MOZ_WIDGET_TOOLKIT'] = CONFIG['MOZ_WIDGET_TOOLKIT']
 
 JAR_MANIFESTS += ['jar.mn']
+
+TESTING_JS_MODULES.mailnews += [
+	'test/fakeserver/auth.js',
+	'test/fakeserver/imapd.js',
+	'test/fakeserver/maild.js',
+	'test/fakeserver/nntpd.js',
+	'test/fakeserver/pop3d.js',
+	'test/fakeserver/smtpd.js',
+	'test/resources/IMAPpump.js',
+	'test/resources/localAccountUtils.js',
+	'test/resources/mailTestUtils.js',
+	'test/resources/MockFactory.js',
+	'test/resources/PromiseTestUtils.jsm',
+]