Bug 485736 - Add (TUnit) 'xpcshell-tests' |make| target, using |runxpcshelltests.py| new '--manifest' option; (Hv1a) Stop XPCSHELL_TESTS execution by 'check' target; r=ted.mielczarek
authorSerge Gautherie <sgautherie.bz@free.fr>
Sun, 26 Apr 2009 23:32:41 +0200
changeset 27861 6b07db0a96611f5b3f04fbf5f3dc41652456ea4b
parent 27860 daefd30072a61aa07571f29d8efb4cd3d7bdd620
child 27862 8db104e9d02463129b382d0e26ffa5c3d482eedc
push id6746
push usersgautherie.bz@free.fr
push dateSun, 26 Apr 2009 21:34:32 +0000
treeherdermozilla-central@6b07db0a9661 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs485736
milestone1.9.2a1pre
Bug 485736 - Add (TUnit) 'xpcshell-tests' |make| target, using |runxpcshelltests.py| new '--manifest' option; (Hv1a) Stop XPCSHELL_TESTS execution by 'check' target; r=ted.mielczarek
config/rules.mk
js/src/config/rules.mk
testing/testsuite-targets.mk
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -149,36 +149,37 @@ libs::
 	$(foreach dir,$(XPCSHELL_TESTS),$(_INSTALL_TESTS))
 	$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl \
           $(testxpcobjdir)/all-test-dirs.list \
           $(addprefix $(MODULE)/,$(XPCSHELL_TESTS))
 
 testxpcsrcdir = $(topsrcdir)/testing/xpcshell
 
 # Execute all tests in the $(XPCSHELL_TESTS) directories.
-check::
+# See also testsuite-targets.mk 'xpcshell-tests' target for global execution.
+xpcshell-tests:
 	$(PYTHON) -u \
           $(testxpcsrcdir)/runxpcshelltests.py \
           $(DIST)/bin/xpcshell \
           $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
 
 # Execute a single test, specified in $(SOLO_FILE), but don't automatically
 # start the test. Instead, present the xpcshell prompt so the user can
 # attach a debugger and then start the test.
-check-interactive::
-	$(PYTHON) \
+check-interactive:
+	$(PYTHON) -u \
           $(testxpcsrcdir)/runxpcshelltests.py \
           --test=$(SOLO_FILE) \
           --interactive \
           $(DIST)/bin/xpcshell \
           $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
 
 # Execute a single test, specified in $(SOLO_FILE)
-check-one::
-	$(PYTHON) \
+check-one:
+	$(PYTHON) -u \
           $(testxpcsrcdir)/runxpcshelltests.py \
           --test=$(SOLO_FILE) \
           $(DIST)/bin/xpcshell \
           $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
 
 endif # XPCSHELL_TESTS
 
 ifdef CPP_UNIT_TESTS
@@ -2246,12 +2247,14 @@ showhost:
 showbuildmods::
 	@echo "Build Modules	= $(BUILD_MODULES)"
 	@echo "Module dirs	= $(BUILD_MODULE_DIRS)"
 
 documentation:
 	@cd $(DEPTH)
 	$(DOXYGEN) $(DEPTH)/config/doxygen.cfg
 
+ifdef ENABLE_TESTS
 check:: $(SUBMAKEFILES) $(MAKE_DIRS)
 	$(LOOP_OVER_PARALLEL_DIRS)
 	$(LOOP_OVER_DIRS)
 	$(LOOP_OVER_TOOL_DIRS)
+endif
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -149,36 +149,37 @@ libs::
 	$(foreach dir,$(XPCSHELL_TESTS),$(_INSTALL_TESTS))
 	$(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/build-list.pl \
           $(testxpcobjdir)/all-test-dirs.list \
           $(addprefix $(MODULE)/,$(XPCSHELL_TESTS))
 
 testxpcsrcdir = $(topsrcdir)/testing/xpcshell
 
 # Execute all tests in the $(XPCSHELL_TESTS) directories.
-check::
+# See also testsuite-targets.mk 'xpcshell-tests' target for global execution.
+xpcshell-tests:
 	$(PYTHON) -u \
           $(testxpcsrcdir)/runxpcshelltests.py \
           $(DIST)/bin/xpcshell \
           $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
 
 # Execute a single test, specified in $(SOLO_FILE), but don't automatically
 # start the test. Instead, present the xpcshell prompt so the user can
 # attach a debugger and then start the test.
-check-interactive::
-	$(PYTHON) \
+check-interactive:
+	$(PYTHON) -u \
           $(testxpcsrcdir)/runxpcshelltests.py \
           --test=$(SOLO_FILE) \
           --interactive \
           $(DIST)/bin/xpcshell \
           $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
 
 # Execute a single test, specified in $(SOLO_FILE)
-check-one::
-	$(PYTHON) \
+check-one:
+	$(PYTHON) -u \
           $(testxpcsrcdir)/runxpcshelltests.py \
           --test=$(SOLO_FILE) \
           $(DIST)/bin/xpcshell \
           $(foreach dir,$(XPCSHELL_TESTS),$(testxpcobjdir)/$(MODULE)/$(dir))
 
 endif # XPCSHELL_TESTS
 
 ifdef CPP_UNIT_TESTS
@@ -2246,12 +2247,14 @@ showhost:
 showbuildmods::
 	@echo "Build Modules	= $(BUILD_MODULES)"
 	@echo "Module dirs	= $(BUILD_MODULE_DIRS)"
 
 documentation:
 	@cd $(DEPTH)
 	$(DOXYGEN) $(DEPTH)/config/doxygen.cfg
 
+ifdef ENABLE_TESTS
 check:: $(SUBMAKEFILES) $(MAKE_DIRS)
 	$(LOOP_OVER_PARALLEL_DIRS)
 	$(LOOP_OVER_DIRS)
 	$(LOOP_OVER_TOOL_DIRS)
+endif
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -82,16 +82,17 @@ reftest:
 	$(CHECK_TEST_ERROR)
 
 crashtest:
 	$(call RUN_REFTEST,$(topsrcdir)/testing/crashtest/crashtests.list)
 	$(CHECK_TEST_ERROR)
 
 
 # Execute all xpcshell tests in the directories listed in the manifest.
+# See also config/rules.mk 'xpcshell-tests' target for local execution.
 xpcshell-tests:
 	$(PYTHON) -u \
 	  $(topsrcdir)/testing/xpcshell/runxpcshelltests.py \
 	  --manifest=$(DEPTH)/_tests/xpcshell/all-test-dirs.list \
 	  $(DIST)/bin/xpcshell
 
 
 # Package up the tests and test harnesses