Bug 454320 - top level test targets should support specifying a test path

This changeset allows the specifying of the --test-path parameter when using the
top-level targets to run mochi-type tests.
r=ted
This commit is contained in:
Shawn Wilsher 2008-09-14 12:11:00 -04:00
Родитель b1e8cb2d8e
Коммит 6094ce7565
2 изменённых файлов: 18 добавлений и 4 удалений

Просмотреть файл

@ -62,8 +62,16 @@ install::
ifdef ENABLE_TESTS
# Implemented in testing/testsuite-targets.mk
# Browser tests live in a slightly different location, so we correct the path
ifdef TEST_PATH
BROWSER_TEST_PATH = --test-path=../browser/$(TEST_PATH)
else
BROWSER_TEST_PATH =
endif
mochitest-browser-chrome:
$(RUN_MOCHITEST) --browser-chrome
$(RUN_MOCHITEST) --browser-chrome $(BROWSER_TEST_PATH)
$(CHECK_TEST_ERROR)
mochitest:: mochitest-browser-chrome

Просмотреть файл

@ -52,16 +52,22 @@ define CHECK_TEST_ERROR
endef
endif
ifdef TEST_PATH
MOCHITEST_PATH = --test-path=$(TEST_PATH)
else
MOCHITEST_PATH =
endif
mochitest-plain:
$(RUN_MOCHITEST)
$(RUN_MOCHITEST) $(MOCHITEST_PATH)
$(CHECK_TEST_ERROR)
mochitest-chrome:
$(RUN_MOCHITEST) --chrome
$(RUN_MOCHITEST) --chrome $(MOCHITEST_PATH)
$(CHECK_TEST_ERROR)
mochitest-a11y:
$(RUN_MOCHITEST) --a11y
$(RUN_MOCHITEST) --a11y $(MOCHITEST_PATH)
$(CHECK_TEST_ERROR)
.PHONY: mochitest mochitest-plain mochitest-chrome mochitest-a11y