Bug 732638 - After "make reftest" or "make crashtest" run completes w/ failures, the harness says "To rerun your failures please run 'make mochitest-plain-rerun-failures'". r=ted
authorJoel Maher <jmaher@mozilla.com>
Tue, 24 Apr 2012 12:57:50 -0400
changeset 92288 73fd809898413c1dd473e24ff28516bfd5f7556b
parent 92287 46647a0711e94bbafcefd0def7ac3e271b804d74
child 92289 79af6cb5647cc894ec0217cf41ff0cd8adb47080
push id22529
push usereakhgari@mozilla.com
push dateWed, 25 Apr 2012 14:06:19 +0000
treeherdermozilla-central@83ef3c9a64b5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs732638
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 732638 - After "make reftest" or "make crashtest" run completes w/ failures, the harness says "To rerun your failures please run 'make mochitest-plain-rerun-failures'". r=ted
testing/testsuite-targets.mk
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -86,27 +86,27 @@ RUN_MOCHITEST_ROBOTIUM = \
   rm -f ./$@.log && \
   $(PYTHON) _tests/testing/mochitest/runtestsremote.py --robocop-path=$(DEPTH)/dist \
     --robocop-ids=$(DEPTH)/build/mobile/robocop/fennec_ids.txt \
     --console-level=INFO --log-file=./$@.log --file-level=INFO $(DM_FLAGS) --dm_trans=$(DM_TRANS) \
     --app=$(TEST_PACKAGE_NAME) --deviceIP=${TEST_DEVICE} --xre-path=${MOZ_HOST_BIN} \
     --robocop=$(DEPTH)/build/mobile/robocop/robocop.ini $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
 
 ifndef NO_FAIL_ON_TEST_ERRORS
-define CHECK_TEST_ERROR
+define check_test_error_internal
   @errors=`grep "TEST-UNEXPECTED-" $@.log` ;\
   if test "$$errors" ; then \
 	  echo "$@ failed:"; \
 	  echo "$$errors"; \
-          echo "To rerun your failures please run 'make mochitest-plain-rerun-failures'"; \
+          $(if $(1),echo $(1)) \
 	  exit 1; \
-  else \
-	  echo "$@ passed"; \
   fi
 endef
+CHECK_TEST_ERROR = $(call check_test_error_internal)
+CHECK_TEST_ERROR_RERUN = $(call check_test_error_internal,"To rerun your failures please run 'make $@-rerun-failures'")
 endif
 
 mochitest-remote: DM_TRANS?=adb
 mochitest-remote:
 	@if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
         echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
     elif [ "${TEST_DEVICE}" = "" -a "$(DM_TRANS)" != "adb" ]; then \
         echo "please prepare your host with the environment variable TEST_DEVICE"; \
@@ -122,21 +122,21 @@ mochitest-robotium:
     elif [ "${TEST_DEVICE}" = "" -a "$(DM_TRANS)" != "adb" ]; then \
         echo "please prepare your host with the environment variable TEST_DEVICE"; \
     else \
         $(RUN_MOCHITEST_ROBOTIUM); \
     fi
 
 mochitest-plain:
 	$(RUN_MOCHITEST)
-	$(CHECK_TEST_ERROR)
+	$(CHECK_TEST_ERROR_RERUN)
 
 mochitest-plain-rerun-failures:
 	$(RERUN_MOCHITEST)
-	$(CHECK_TEST_ERROR)
+	$(CHECK_TEST_ERROR_RERUN)
 
 # Allow mochitest-1 ... mochitest-5 for developer ease
 mochitest-1 mochitest-2 mochitest-3 mochitest-4 mochitest-5: mochitest-%:
 	echo "mochitest: $* / 5"
 	$(RUN_MOCHITEST) --chunk-by-dir=4 --total-chunks=5 --this-chunk=$*
 	$(CHECK_TEST_ERROR)
 
 mochitest-chrome: