Bug 1033836 - Convert TESTING_JS_MODULES to moz.build; r=glandium
authorGregory Szorc <gps@mozilla.com>
Wed, 02 Jul 2014 16:43:41 -0700
changeset 213595 b80294339e0632ae251477614f0311945f4c216f
parent 213594 366db5956b6bfcb591313cd00539e36feab9c9f1
child 213596 d5d2905c8a94fa2dbfa4a9bb19d31eb4aaabc2a0
push idunknown
push userunknown
push dateunknown
reviewersglandium
bugs1033836
milestone33.0a1
Bug 1033836 - Convert TESTING_JS_MODULES to moz.build; r=glandium
netwerk/test/httpserver/Makefile.in
netwerk/test/httpserver/moz.build
services/common/Makefile.in
services/common/moz.build
services/datareporting/Makefile.in
services/datareporting/moz.build
services/healthreport/Makefile.in
services/healthreport/moz.build
services/metrics/Makefile.in
services/metrics/moz.build
services/sync/Makefile.in
services/sync/moz.build
testing/modules/Makefile.in
testing/modules/moz.build
toolkit/components/crashes/Makefile.in
toolkit/components/crashes/moz.build
toolkit/mozapps/extensions/test/Makefile.in
toolkit/mozapps/extensions/test/moz.build
--- a/netwerk/test/httpserver/Makefile.in
+++ b/netwerk/test/httpserver/Makefile.in
@@ -9,10 +9,8 @@ NO_INTERFACES_MANIFEST = 1
 ifdef XPI_NAME
 NO_JS_MANIFEST = 1
 USE_EXTENSION_MANIFEST = 1
 else
 EXTRA_COMPONENTS += \
                    httpd.manifest \
                    $(NULL)
 endif
-
-TESTING_JS_MODULES = httpd.js
--- a/netwerk/test/httpserver/moz.build
+++ b/netwerk/test/httpserver/moz.build
@@ -11,9 +11,13 @@ XPIDL_SOURCES += [
 XPIDL_MODULE = 'test_necko'
 
 XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
 
 EXTRA_COMPONENTS += [
     'httpd.js',
 ]
 
-JAR_MANIFESTS += ['jar.mn']
\ No newline at end of file
+TESTING_JS_MODULES += [
+    'httpd.js',
+]
+
+JAR_MANIFESTS += ['jar.mn']
--- a/services/common/Makefile.in
+++ b/services/common/Makefile.in
@@ -13,34 +13,24 @@ modules := \
 
 pp_modules := \
   async.js \
   bagheeraclient.js \
   observers.js \
   rest.js \
   $(NULL)
 
-testing_modules := \
-  bagheeraserver.js \
-  logging.js \
-  storageserver.js \
-  utils.js \
-  $(NULL)
-
 JS_EXPORTS_FILES := $(srcdir)/services-common.js
 JS_EXPORTS_DEST = $(FINAL_TARGET)/$(PREF_DIR)
 INSTALL_TARGETS += JS_EXPORTS
 
 MODULES_FILES := $(modules)
 MODULES_DEST = $(FINAL_TARGET)/modules/services-common
 INSTALL_TARGETS += MODULES
 
-TESTING_JS_MODULES := $(addprefix modules-testing/,$(testing_modules))
-TESTING_JS_MODULE_DIR := services/common
-
 PP_JS_MODULES := $(pp_modules)
 PP_JS_MODULES_PATH = $(FINAL_TARGET)/modules/services-common
 PP_TARGETS += PP_JS_MODULES
 
 include $(topsrcdir)/config/rules.mk
 
 # What follows is a helper to launch a standalone storage server instance.
 # Most of the code lives in a Python script in the tests directory. If we
--- a/services/common/moz.build
+++ b/services/common/moz.build
@@ -4,8 +4,15 @@
 # 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/.
 
 TEST_DIRS += ['tests']
 
 EXTRA_COMPONENTS += [
     'servicesComponents.manifest',
 ]
+
+TESTING_JS_MODULES.services.common += [
+    'modules-testing/bagheeraserver.js',
+    'modules-testing/logging.js',
+    'modules-testing/storageserver.js',
+    'modules-testing/utils.js',
+]
--- a/services/datareporting/Makefile.in
+++ b/services/datareporting/Makefile.in
@@ -1,14 +1,11 @@
 # 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/.
 
 MODULES := policy.jsm sessions.jsm
 MODULES_PATH = $(FINAL_TARGET)/modules/services/datareporting
 PP_TARGETS += MODULES
 
-TESTING_JS_MODULES := $(addprefix modules-testing/,mocks.jsm)
-TESTING_JS_MODULE_DIR := services/datareporting
-
 include $(topsrcdir)/config/rules.mk
 
 $(FINAL_TARGET)/components/DataReportingService.js: policy.jsm sessions.jsm ../common/observers.js
--- a/services/datareporting/moz.build
+++ b/services/datareporting/moz.build
@@ -8,8 +8,12 @@ TEST_DIRS += ['tests']
 
 EXTRA_COMPONENTS += [
     'DataReporting.manifest',
 ]
 
 EXTRA_PP_COMPONENTS += [
     'DataReportingService.js',
 ]
+
+TESTING_JS_MODULES.services.datareporting += [
+    'modules-testing/mocks.jsm',
+]
--- a/services/healthreport/Makefile.in
+++ b/services/healthreport/Makefile.in
@@ -3,20 +3,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 modules := \
   healthreporter.jsm \
   profile.jsm \
   providers.jsm \
   $(NULL)
 
-testing_modules := \
-  utils.jsm \
-  $(NULL)
-
 healthreport_depends = \
   HealthReport.jsm \
   ../common/async.js \
   ../common/bagheeraclient.js \
   ../metrics/Metrics.jsm \
   ../metrics/providermanager.jsm \
   ../metrics/dataprovider.jsm \
   ../metrics/storage.jsm \
@@ -31,15 +27,12 @@ MAIN_JS_MODULE_PATH = $(FINAL_TARGET)/mo
 MAIN_JS_MODULE_FLAGS := $(extra_pp_flags)
 PP_TARGETS += MAIN_JS_MODULE
 
 MODULES := $(modules)
 MODULES_PATH = $(FINAL_TARGET)/modules/services/healthreport
 MODULES_FLAGS := $(extra_pp_flags)
 PP_TARGETS += MODULES
 
-TESTING_JS_MODULES := $(addprefix modules-testing/,$(testing_modules))
-TESTING_JS_MODULE_DIR := services/healthreport
-
 include $(topsrcdir)/config/rules.mk
 
 # Add extra prerequisites until bug 837792 is addressed.
 $(FINAL_TARGET)/modules/HealthReport.jsm: $(healthreport_depends)
--- a/services/healthreport/moz.build
+++ b/services/healthreport/moz.build
@@ -6,8 +6,12 @@
 
 SPHINX_TREES['healthreport'] = 'docs'
 
 TEST_DIRS += ['tests']
 
 EXTRA_PP_COMPONENTS += [
     'HealthReportComponents.manifest',
 ]
+
+TESTING_JS_MODULES.services.healthreport += [
+    'modules-testing/utils.jsm',
+]
--- a/services/metrics/Makefile.in
+++ b/services/metrics/Makefile.in
@@ -1,21 +1,14 @@
 # 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/.
 
-testing_modules := \
-  mocks.jsm \
-  $(NULL)
-
 # We install Metrics.jsm into the "main" JSM repository and the rest in
 # services. External consumers should only go through Metrics.jsm.
 MAIN_JS_MODULE := Metrics.jsm
 MAIN_JS_MODULE_PATH = $(FINAL_TARGET)/modules
 PP_TARGETS += MAIN_JS_MODULE
 
-TESTING_JS_MODULES := $(addprefix modules-testing/,$(testing_modules))
-TESTING_JS_MODULE_DIR := services/metrics
-
 include $(topsrcdir)/config/rules.mk
 
 # Add extra prerequisites until bug 837792 is addressed.
 $(FINAL_TARGET)/modules/Metrics.jsm: Metrics.jsm providermanager.jsm dataprovider.jsm storage.jsm
--- a/services/metrics/moz.build
+++ b/services/metrics/moz.build
@@ -9,8 +9,11 @@ TEST_DIRS += ['tests']
 EXTRA_PP_JS_MODULES += [
     'dataprovider.jsm',
     'providermanager.jsm',
     'storage.jsm',
 ]
 
 JS_MODULES_PATH = 'modules/services/metrics'
 
+TESTING_JS_MODULES.services.metrics += [
+    'modules-testing/mocks.jsm',
+]
--- a/services/sync/Makefile.in
+++ b/services/sync/Makefile.in
@@ -50,34 +50,24 @@ sync_engine_modules := \
   $(NULL)
 
 sync_stage_modules := \
   cluster.js \
   declined.js \
   enginesync.js \
   $(NULL)
 
-sync_testing_modules := \
-  fakeservices.js \
-  rotaryengine.js \
-  utils.js \
-  fxa_utils.js \
-  $(NULL)
-
 JS_EXPORTS_FILES := $(srcdir)/services-sync.js
 JS_EXPORTS_DEST = $(FINAL_TARGET)/$(PREF_DIR)
 INSTALL_TARGETS += JS_EXPORTS
 
 # Install JS module files.
 SYNC_MAIN_FILES := $(addprefix modules/,$(sync_modules))
 SYNC_MAIN_DEST = $(FINAL_TARGET)/modules/services-sync
 INSTALL_TARGETS += SYNC_MAIN
 
 SYNC_ENGINES_FILES := $(addprefix modules/engines/,$(sync_engine_modules))
 SYNC_ENGINES_DEST = $(FINAL_TARGET)/modules/services-sync/engines
 INSTALL_TARGETS += SYNC_ENGINES
 
 SYNC_STAGES_FILES := $(addprefix modules/stages/,$(sync_stage_modules))
 SYNC_STAGES_DEST = $(FINAL_TARGET)/modules/services-sync/stages
 INSTALL_TARGETS += SYNC_STAGES
-
-TESTING_JS_MODULES := $(addprefix modules-testing/,$(sync_testing_modules))
-TESTING_JS_MODULE_DIR := services/sync
--- a/services/sync/moz.build
+++ b/services/sync/moz.build
@@ -9,8 +9,15 @@ TEST_DIRS += ['tests']
 
 EXTRA_COMPONENTS += [
     'Weave.js',
 ]
 
 EXTRA_PP_COMPONENTS += [
     'SyncComponents.manifest',
 ]
+
+TESTING_JS_MODULES.services.sync += [
+    'modules-testing/fakeservices.js',
+    'modules-testing/fxa_utils.js',
+    'modules-testing/rotaryengine.js',
+    'modules-testing/utils.js',
+]
deleted file mode 100644
--- a/testing/modules/Makefile.in
+++ /dev/null
@@ -1,9 +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/.
-
-TESTING_JS_MODULES := \
-  AppData.jsm \
-  AppInfo.jsm \
-  Assert.jsm \
-  $(NULL)
--- a/testing/modules/moz.build
+++ b/testing/modules/moz.build
@@ -1,8 +1,14 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # 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/.
 
 XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
 BROWSER_CHROME_MANIFESTS += ['tests/browser/browser.ini']
+
+TESTING_JS_MODULES += [
+    'AppData.jsm',
+    'AppInfo.jsm',
+    'Assert.jsm',
+]
deleted file mode 100644
--- a/toolkit/components/crashes/Makefile.in
+++ /dev/null
@@ -1,5 +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/.
-
-TESTING_JS_MODULES := CrashManagerTest.jsm
--- a/toolkit/components/crashes/moz.build
+++ b/toolkit/components/crashes/moz.build
@@ -10,15 +10,19 @@ EXTRA_COMPONENTS += [
     'CrashService.js',
     'CrashService.manifest',
 ]
 
 EXTRA_JS_MODULES += [
     'CrashManager.jsm',
 ]
 
+TESTING_JS_MODULES += [
+    'CrashManagerTest.jsm',
+]
+
 XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
 
 XPIDL_MODULE = 'toolkit_crashservice'
 
 XPIDL_SOURCES += [
     'nsICrashService.idl',
 ]
--- a/toolkit/mozapps/extensions/test/Makefile.in
+++ b/toolkit/mozapps/extensions/test/Makefile.in
@@ -1,14 +1,12 @@
 # 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/.
 
-TESTING_JS_MODULES := AddonManagerTesting.jsm
-
 ADDONSRC = $(srcdir)/addons
 TESTROOT = $(CURDIR)/$(DEPTH)/_tests/xpcshell/$(relativesrcdir)
 TESTXPI = $(TESTROOT)/xpcshell/addons
 
 include $(topsrcdir)/config/rules.mk
 
 libs::
 	rm -rf $(TESTXPI)
--- a/toolkit/mozapps/extensions/test/moz.build
+++ b/toolkit/mozapps/extensions/test/moz.build
@@ -5,12 +5,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 if CONFIG['MOZ_BUILD_APP'] != 'mobile':
     DIRS += ['browser']
 
     BROWSER_CHROME_MANIFESTS += ['xpinstall/browser.ini']
     MOCHITEST_MANIFESTS += ['mochitest/mochitest.ini']
 
+TESTING_JS_MODULES += [
+    'AddonManagerTesting.jsm',
+]
+
 XPCSHELL_TESTS_MANIFESTS += [
     'xpcshell/xpcshell-unpack.ini',
     'xpcshell/xpcshell.ini',
 ]