From cef8c5bb2ed92d2dcc68a90356b050bf0e8684aa Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Thu, 10 May 2012 10:19:16 -0700 Subject: [PATCH] Bug 748490 - Part 3: Followups to part 2; r=ted Previous patch was submitted prematurely by accident. This addresses nits from review. --- config/rules.mk | 6 +++--- js/src/config/rules.mk | 6 +++--- testing/testsuite-targets.mk | 2 +- testing/xpcshell/head.js | 4 ++-- testing/xpcshell/runxpcshelltests.py | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/rules.mk b/config/rules.mk index 71f6fe7e5e53..ff2a2513b495 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -117,7 +117,7 @@ xpcshell-tests: --symbols-path=$(DIST)/crashreporter-symbols \ --build-info-json=$(DEPTH)/mozinfo.json \ --tests-root-dir=$(testxpcobjdir) \ - --tests-modules-dir=$(DEPTH)/_tests/modules \ + --testing-modules-dir=$(DEPTH)/_tests/modules \ --xunit-file=$(testxpcobjdir)/$(relativesrcdir)/results.xml \ --xunit-suite-name=xpcshell \ $(EXTRA_TEST_ARGS) \ @@ -148,7 +148,7 @@ check-interactive: --symbols-path=$(DIST)/crashreporter-symbols \ --build-info-json=$(DEPTH)/mozinfo.json \ --test-path=$(SOLO_FILE) \ - --tests-modules-dir=$(DEPTH)/_tests/modules \ + --testing-modules-dir=$(DEPTH)/_tests/modules \ --profile-name=$(MOZ_APP_NAME) \ --interactive \ $(LIBXUL_DIST)/bin/xpcshell \ @@ -162,7 +162,7 @@ check-one: --symbols-path=$(DIST)/crashreporter-symbols \ --build-info-json=$(DEPTH)/mozinfo.json \ --test-path=$(SOLO_FILE) \ - --tests-modules-dir=$(DEPTH)/_tests/modules \ + --testing-modules-dir=$(DEPTH)/_tests/modules \ --profile-name=$(MOZ_APP_NAME) \ --verbose \ $(EXTRA_TEST_ARGS) \ diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index 71f6fe7e5e53..ff2a2513b495 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -117,7 +117,7 @@ xpcshell-tests: --symbols-path=$(DIST)/crashreporter-symbols \ --build-info-json=$(DEPTH)/mozinfo.json \ --tests-root-dir=$(testxpcobjdir) \ - --tests-modules-dir=$(DEPTH)/_tests/modules \ + --testing-modules-dir=$(DEPTH)/_tests/modules \ --xunit-file=$(testxpcobjdir)/$(relativesrcdir)/results.xml \ --xunit-suite-name=xpcshell \ $(EXTRA_TEST_ARGS) \ @@ -148,7 +148,7 @@ check-interactive: --symbols-path=$(DIST)/crashreporter-symbols \ --build-info-json=$(DEPTH)/mozinfo.json \ --test-path=$(SOLO_FILE) \ - --tests-modules-dir=$(DEPTH)/_tests/modules \ + --testing-modules-dir=$(DEPTH)/_tests/modules \ --profile-name=$(MOZ_APP_NAME) \ --interactive \ $(LIBXUL_DIST)/bin/xpcshell \ @@ -162,7 +162,7 @@ check-one: --symbols-path=$(DIST)/crashreporter-symbols \ --build-info-json=$(DEPTH)/mozinfo.json \ --test-path=$(SOLO_FILE) \ - --tests-modules-dir=$(DEPTH)/_tests/modules \ + --testing-modules-dir=$(DEPTH)/_tests/modules \ --profile-name=$(MOZ_APP_NAME) \ --verbose \ $(EXTRA_TEST_ARGS) \ diff --git a/testing/testsuite-targets.mk b/testing/testsuite-targets.mk index ac51acf562ce..4a832818023b 100644 --- a/testing/testsuite-targets.mk +++ b/testing/testsuite-targets.mk @@ -245,7 +245,7 @@ xpcshell-tests: --build-info-json=$(DEPTH)/mozinfo.json \ --no-logfiles \ --tests-root-dir=$(call core_abspath,_tests/xpcshell) \ - --tests-modules-dir=$(call core_abspath,_tests/modules) \ + --testing-modules-dir=$(call core_abspath,_tests/modules) \ --xunit-file=$(call core_abspath,_tests/xpcshell/results.xml) \ --xunit-suite-name=xpcshell \ $(SYMBOLS_PATH) \ diff --git a/testing/xpcshell/head.js b/testing/xpcshell/head.js index b6ffd55ea09d..76e796a59ba4 100644 --- a/testing/xpcshell/head.js +++ b/testing/xpcshell/head.js @@ -303,7 +303,7 @@ function do_get_idle() { function _execute_test() { // Map resource://test/ to current working directory and - // resource://testing/ to the shared test modules directory. + // resource://testing-common/ to the shared test modules directory. let (ios = Components.classes["@mozilla.org/network/io-service;1"] .getService(Components.interfaces.nsIIOService)) { let protocolHandler = @@ -318,7 +318,7 @@ function _execute_test() { modulesFile.initWithPath(_TESTING_MODULES_DIR); let modulesURI = ios.newFileURI(modulesFile); - protocolHandler.setSubstitution("testing", modulesURI); + protocolHandler.setSubstitution("testing-common", modulesURI); } } diff --git a/testing/xpcshell/runxpcshelltests.py b/testing/xpcshell/runxpcshelltests.py index 078ffb623278..aeafc7f6943b 100644 --- a/testing/xpcshell/runxpcshelltests.py +++ b/testing/xpcshell/runxpcshelltests.py @@ -235,7 +235,7 @@ class XPCShellTests(object): '-e', 'const _HEAD_JS_PATH = "%s";' % self.headJSPath ] - if self.testingModulesDir is not None: + if self.testingModulesDir: self.xpcsCmd.extend([ '-e', 'const _TESTING_MODULES_DIR = "%s";' % self.testingModulesDir @@ -621,7 +621,7 @@ class XPCShellTests(object): raise Exception("testsRootDir path does not exists: %s" % testsRootDir) - if testingModulesDir is not None: + if testingModulesDir: if not os.path.isabs(testingModulesDir): testingModulesDir = os.path.abspath(testingModulesDir) @@ -900,7 +900,7 @@ class XPCShellOptions(OptionParser): self.add_option("--tests-root-dir", type="string", dest="testsRootDir", default=None, help="absolute path to directory where all tests are located. this is typically $(objdir)/_tests") - self.add_option("--tests-modules-dir", + self.add_option("--testing-modules-dir", dest="testingModulesDir", default=None, help="Directory where testing modules are located.") self.add_option("--total-chunks",