Add SLOW_TESTS variable to sub.mk, which expresses the submodules to normally skip tests for. 'make check' will skip SLOW_TESTS submodules, and 'make check-all' will run everything. Fixes #169.

This commit is contained in:
Brian J. Burg 2012-11-05 13:32:24 -08:00
parent 681d7f2a0a
commit 36f1bb763f
2 changed files with 11 additions and 3 deletions

View file

@ -8,7 +8,7 @@ check-$(1) : $$(DONE_$(1))
$$(ENV_RFLAGS_$(1)) \
$$(MAKE) -C $$(B)src/$(1) check
DEPS_CHECK += check-$(1)
DEPS_CHECK_ALL += $(1)
endef
$(foreach submodule,$(CFG_SUBMODULES),\
@ -26,9 +26,11 @@ reftest: $(S)src/reftest/reftest.rs servo
contenttest: $(S)src/contenttest/contenttest.rs servo
$(RUSTC) $(RFLAGS_servo) -o $@ $< -L .
.PHONY: check $(DEPS_CHECK)
.PHONY: check $(DEPS_CHECK_ALL)
check: $(DEPS_CHECK) check-servo
check: $(addprefix check-,$(filter-out $(SLOW_TESTS),$(DEPS_CHECK_ALL))) check-servo
check-all: $(addprefix check-,$(DEPS_CHECK_ALL)) check-servo
check-servo: servo-test
./servo-test $(TESTNAME)

View file

@ -1,3 +1,9 @@
# Tests for these submodules will not be run by the default `make check` target.
SLOW_TESTS += \
mozjs \
$(NULL)
# NOTE: the make magic can only compute transitive build dependencies,
# not transitive link flags. So, if A -> B -> C, must add A as a dep
# of C so the correct -L/path/to/A flag is generated for building C.