Bug 782658 - Make make -C mailnews xpcshell-tests show failures nicely (improve the current hack). r=Callek
authorMark Banner <bugzilla@standard8.plus.com>
Mon, 27 Aug 2012 18:53:35 +0100
changeset 10974 7c9b7ca2be40e3b967dcc1b0bdaaf42a5b6fd9ad
parent 10973 d16a703b881800ab91df1659e6e48a54c9c70822
child 10975 27d2409937a10fc3e3e9b0804c54bb60420ba2a4
push id8233
push userbugzilla@standard8.plus.com
push dateMon, 27 Aug 2012 17:56:14 +0000
treeherdercomm-central@27d2409937a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs782658
Bug 782658 - Make make -C mailnews xpcshell-tests show failures nicely (improve the current hack). r=Callek
mailnews/Makefile.in
--- a/mailnews/Makefile.in
+++ b/mailnews/Makefile.in
@@ -7,16 +7,17 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE       = mailnews
 
+# If adding to these, consider if you need to add to XPCSHELL_TEST_DIRS below.
 PARALLEL_DIRS	+= \
 	addrbook \
 	base/search/src \
 	compose \
 	db/gloda \
 	db/msgdb \
 	extensions\
 	imap \
@@ -54,17 +55,23 @@ libs::
 	$(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 extensions/mdn
+XPCSHELL_TEST_DIRS = addrbook base compose db/gloda db/msgdb extensions/bayesian-spam-filter extensions/mdn imap import local mime news
 
 xpcshell-tests::
-	for dir in $(TEST_DIRS); do \
-	  if test -d $$dir/test; then \
-	    $(MAKE) -C $$dir/test xpcshell-tests; \
-	  fi; \
-	done
+	$(PYTHON) -u $(MOZILLA_DIR)/config/pythonpath.py \
+	  -I$(MOZILLA_DIR)/build -I$(MOZDEPTH)/_tests/mozbase/mozinfo \
+	  $(MOZILLA_SRCDIR)/testing/xpcshell/runxpcshelltests.py \
+	  --symbols-path=$(DIST)/crashreporter-symbols \
+	  --build-info-json=$(MOZDEPTH)/mozinfo.json \
+	  --tests-root-dir=$(testxpcobjdir) \
+	  --xunit-file=$(testxpcobjdir)/mailnews/results.xml \
+	  --xunit-suite-name=xpcshell \
+	  $(EXTRA_TEST_ARGS) \
+	  $(LIBXUL_DIST)/bin/xpcshell \
+	  $(foreach dir,$(XPCSHELL_TEST_DIRS),$(testxpcobjdir)/mailnews/$(dir)/test/unit)
 endif