From 36f1bb763fe67b095e7bbaf29c2ca6bd4d72c630 Mon Sep 17 00:00:00 2001 From: "Brian J. Burg" Date: Mon, 5 Nov 2012 13:32:24 -0800 Subject: [PATCH] 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. --- mk/check.mk | 8 +++++--- mk/sub.mk | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mk/check.mk b/mk/check.mk index 909a1e5b506..fbc2592d46a 100644 --- a/mk/check.mk +++ b/mk/check.mk @@ -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) diff --git a/mk/sub.mk b/mk/sub.mk index ff5e452e8eb..78292a522b4 100644 --- a/mk/sub.mk +++ b/mk/sub.mk @@ -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.