Bug 485736 - Add (TUnit) 'xpcshell-tests' |make| target, using |runxpcshelltests.py| new '--manifest' option; (Kv1-CC) Stop XPCSHELL_TESTS execution by 'check' target, Update '.PHONY' target too; r=bugzilla@standard8.plus.com
Bug 485736 - Add (TUnit) 'xpcshell-tests' |make| target, using |runxpcshelltests.py| new '--manifest' option; (Kv1-CC) Stop XPCSHELL_TESTS execution by 'check' target, Update '.PHONY' target too; r=bugzilla@standard8.plus.com
--- a/Makefile.in
+++ b/Makefile.in
@@ -42,20 +42,27 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
default::
include $(topsrcdir)/$(MOZ_BUILD_APP)/build.mk
include $(topsrcdir)/config/config.mk
-default export libs clean realclean distclean alldep maybe_clobber_profiledbuild rebase uploadsymbols signnss deliver \
-check mochitest mochitest-plain mochitest-chrome mochitest-browser-chrome mochitest-a11y reftest crashtest xpcshell-tests::
+default export libs clean realclean distclean alldep maybe_clobber_profiledbuild rebase uploadsymbols signnss deliver::
$(MAKE) -C mozilla $@
+ifdef ENABLE_TESTS
+check \
+mochitest mochitest-plain mochitest-chrome mochitest-browser-chrome mochitest-a11y \
+reftest crashtest \
+xpcshell-tests::
+ $(MAKE) -C mozilla $@
+endif
+
# http://bugzilla.mozilla.org/show_bug.cgi?id=450485
MAKE_SYM_STORE_PATH=dist/bin
ifeq ($(OS_ARCH),Darwin)
ifdef UNIVERSAL_BINARY
MAKE_SYM_STORE_PATH=dist/universal
endif
endif
ifeq ($(OS_ARCH),WINNT)
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -146,36 +146,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 = $(MOZILLA_SRCDIR)/testing/xpcshell
# Execute all tests in the $(XPCSHELL_TESTS) directories.
-check::
- $(PYTHON) \
+# See also mozilla/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
@@ -192,16 +193,18 @@ LIBS += $(XPCOM_GLUE_LDOPTS) $(NSPR_LIBS
check::
@$(EXIT_ON_ERROR) \
for f in $(subst .cpp,,$(CPP_UNIT_TESTS)); do \
XPCOM_DEBUG_BREAK=stack-and-abort $(RUN_TEST_PROGRAM) $(DIST)/bin/$$f; \
done
endif # CPP_UNIT_TESTS
+.PHONY: check xpcshell-tests check-interactive check-one
+
endif # ENABLE_TESTS
#
# Library rules
#
# If BUILD_STATIC_LIBS or FORCE_STATIC_LIB is set, build a static library.
# Otherwise, build a shared library.
@@ -2026,17 +2029,17 @@ endif
# hundreds of built-in suffix rules for stuff we don't need.
#
.SUFFIXES:
#
# Fake targets. Always run these rules, even if a file/directory with that
# name already exists.
#
-.PHONY: all all_platforms alltags boot checkout chrome realchrome clean clobber clobber_all export install libs makefiles realclean run_viewer run_apprunner tools $(DIRS) $(TOOL_DIRS) FORCE check check-interactive check-one
+.PHONY: all all_platforms alltags boot checkout chrome realchrome clean clobber clobber_all export install libs makefiles realclean run_viewer run_apprunner tools $(DIRS) $(TOOL_DIRS) FORCE
# Used as a dependency to force targets to rebuild
FORCE:
# Delete target if error occurs when building target
.DELETE_ON_ERROR:
# Properly set LIBPATTERNS for the platform
@@ -2164,12 +2167,14 @@ ifneq (,$(filter $(PROGRAM) $(SIMPLE_PRO
endif
+$(LOOP_OVER_PARALLEL_DIRS)
+$(LOOP_OVER_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