Bug 491376 Restore make -C mailnews/ check/xpcshell-tests functionality to mailnews. r=KaiRo
authorMark Banner <bugzilla@standard8.plus.com>
Thu, 07 May 2009 13:28:49 +0100
changeset 2583 c1b691f7596bf6b9d4757acee9f995423c9e8bd7
parent 2582 1d7bfe5ae518e443f143d8023637edd8b013fe4a
child 2584 e69e1122b17ad4ba155e2a4734ac41d85b2b8281
child 2588 cb36617b6a11ce5d7bab1ba13a2a8d7e42602d71
push idunknown
push userunknown
push dateunknown
reviewersKaiRo
bugs491376
Bug 491376 Restore make -C mailnews/ check/xpcshell-tests functionality to mailnews. r=KaiRo
mailnews/Makefile.in
--- a/mailnews/Makefile.in
+++ b/mailnews/Makefile.in
@@ -65,8 +65,23 @@ DEFINES += -DOS_ARCH=$(OS_ARCH) \
            $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 libs::
 	$(INSTALL) $(wildcard $(srcdir)/test/resources/*.js) $(MOZDEPTH)/_tests/xpcshell/mailnews/resources
 	$(INSTALL) $(wildcard $(srcdir)/test/data/*) $(MOZDEPTH)/_tests/xpcshell/mailnews/data
 	$(INSTALL) $(wildcard $(srcdir)/test/fakeserver/*.js) $(MOZDEPTH)/_tests/xpcshell/mailnews/fakeserver
+
+# 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.
+
+TEST_DIRS = base $(PARALLEL_DIRS) extensions/bayesian-spam-filter
+
+xpcshell-tests::
+	for dir in $(TEST_DIRS); do \
+	  if test -d $$dir/test; then \
+	    $(MAKE) -C $$dir/test xpcshell-tests; \
+	  fi; \
+	done