From 563ce1036484eb7967218cab66d5cb0e6e1f6f2e Mon Sep 17 00:00:00 2001 From: Joel Maher Date: Tue, 24 Apr 2012 12:57:50 -0400 Subject: [PATCH] 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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/testing/testsuite-targets.mk b/testing/testsuite-targets.mk index 95a91d58c9e7..c06095d66ffc 100644 --- a/testing/testsuite-targets.mk +++ b/testing/testsuite-targets.mk @@ -91,17 +91,17 @@ RUN_MOCHITEST_ROBOTIUM = \ --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 @@ -127,11 +127,11 @@ mochitest-robotium: 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-%: