зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
b1e8cb2d8e
Коммит
6094ce7565
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче