Bug 469581 - |make *test*| doesn't accept arguments, like --leak-threshold; (Av1a) Support an |EXTRA_TEST_ARGS| variable; r=ted.mielczarek
authorSerge Gautherie <sgautherie.bz@free.fr>
Tue, 24 Mar 2009 01:09:37 +0100
changeset 26479 1c35af83002a1f1cf24f67671771b7ac3cf4bbd6
parent 26478 999cd55bd9c046b6205ead0b6c7c17bd5552d731
child 26480 1517b7567b2895c007f1401a82fb1959114ab7d4
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs469581
milestone1.9.2a1pre
Bug 469581 - |make *test*| doesn't accept arguments, like --leak-threshold; (Av1a) Support an |EXTRA_TEST_ARGS| variable; r=ted.mielczarek
browser/build.mk
testing/testsuite-targets.mk
--- a/browser/build.mk
+++ b/browser/build.mk
@@ -70,22 +70,16 @@ source-package::
 	@$(MAKE) -C browser/installer source-package
 
 upload::
 	@$(MAKE) -C browser/installer upload
 
 ifdef ENABLE_TESTS
 # Implemented in testing/testsuite-targets.mk
 
-ifdef TEST_PATH
-BROWSER_TEST_PATH = --test-path=$(TEST_PATH)
-else
-BROWSER_TEST_PATH =
-endif
-
 mochitest-browser-chrome:
-	$(RUN_MOCHITEST) --browser-chrome $(BROWSER_TEST_PATH)
+	$(RUN_MOCHITEST) --browser-chrome
 	$(CHECK_TEST_ERROR)
 
 mochitest:: mochitest-browser-chrome
 
 .PHONY: mochitest-browser-chrome
 endif
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -30,19 +30,20 @@
 # use your version of this file under the terms of the MPL, indicate your
 # decision by deleting the provisions above and replace them with the notice
 # and other provisions required by the GPL or the LGPL. If you do not delete
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
+# Usage: |make [EXTRA_TEST_ARGS=...] mochitest*|.
 mochitest:: mochitest-plain mochitest-chrome mochitest-a11y
 
-RUN_MOCHITEST = rm -f ./$@.log && $(PYTHON) _tests/testing/mochitest/runtests.py --autorun --close-when-done --console-level=INFO  --log-file=./$@.log --file-level=INFO
+RUN_MOCHITEST = rm -f ./$@.log && $(PYTHON) _tests/testing/mochitest/runtests.py --autorun --close-when-done --console-level=INFO --log-file=./$@.log --file-level=INFO $(MOCHITEST_PATH) $(EXTRA_TEST_ARGS)
 
 ifndef NO_FAIL_ON_TEST_ERRORS
 define CHECK_TEST_ERROR
   @errors=`grep "TEST-UNEXPECTED-" $@.log` ;\
   if test "$$errors" ; then \
 	  echo "$@ failed:"; \
 	  echo "$$errors"; \
 	  exit 1; \
@@ -54,28 +55,29 @@ endif
 
 ifdef TEST_PATH
 MOCHITEST_PATH = --test-path=$(TEST_PATH)
 else
 MOCHITEST_PATH =
 endif
 
 mochitest-plain:
-	$(RUN_MOCHITEST) $(MOCHITEST_PATH)
+	$(RUN_MOCHITEST)
 	$(CHECK_TEST_ERROR)
 
 mochitest-chrome:
-	$(RUN_MOCHITEST) --chrome $(MOCHITEST_PATH)
+	$(RUN_MOCHITEST) --chrome
 	$(CHECK_TEST_ERROR)
 
 mochitest-a11y:
-	$(RUN_MOCHITEST) --a11y $(MOCHITEST_PATH)
+	$(RUN_MOCHITEST) --a11y
 	$(CHECK_TEST_ERROR)
 
-RUN_REFTEST = rm -f ./$@.log && $(PYTHON) _tests/reftest/runreftest.py $(1) | tee ./$@.log
+# Usage: |make [EXTRA_TEST_ARGS=...] *test|.
+RUN_REFTEST = rm -f ./$@.log && $(PYTHON) _tests/reftest/runreftest.py $(EXTRA_TEST_ARGS) $(1) | tee ./$@.log
 
 reftest:
 	$(call RUN_REFTEST,$(topsrcdir)/layout/reftests/reftest.list)
 	$(CHECK_TEST_ERROR)
 
 crashtest:
 	$(call RUN_REFTEST,$(topsrcdir)/testing/crashtest/crashtests.list)
 	$(CHECK_TEST_ERROR)