Skip to content

Commit

Permalink
Bug 469581 - |make *test*| doesn't accept arguments, like --leak-thre…
Browse files Browse the repository at this point in the history
…shold; (Av1a) Support an |EXTRA_TEST_ARGS| variable; r=ted.mielczarek
  • Loading branch information
Serge Gautherie committed Mar 24, 2009
1 parent 5c7c4c4 commit 9f12134
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
8 changes: 1 addition & 7 deletions browser/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,8 @@ 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
Expand Down
12 changes: 7 additions & 5 deletions testing/testsuite-targets.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@
#
# ***** 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
Expand All @@ -59,18 +60,19 @@ 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)
Expand Down

0 comments on commit 9f12134

Please sign in to comment.