diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-12-24 22:59:38 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-12-24 22:59:38 -0800 |
| commit | 70ff5f7033b53a55b6107fbf6a18b05e59e8e391 (patch) | |
| tree | 1fd328491bddf7b2c2a73f0b310252c7c6533bed | |
| parent | a1e68debb1b0054634ce071b98142c911a03e4d1 (diff) | |
| download | rust-70ff5f7033b53a55b6107fbf6a18b05e59e8e391.tar.gz rust-70ff5f7033b53a55b6107fbf6a18b05e59e8e391.zip | |
mk: Fix doc tests for multiple targets
It only really makes sense to run tests for the build target anyway because it's not guaranteed that you can execute other targets. This is blocking the next snapshot
| -rw-r--r-- | mk/tests.mk | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/mk/tests.mk b/mk/tests.mk index 1a56c008ccb..d36e0e44295 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -745,21 +745,27 @@ CRATE_DOC_LIB-extra = $(EXTRALIB_CRATE) define DEF_CRATE_DOC_TEST -check-stage$(1)-T-$(2)-H-$(2)-doc-$(3)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(2),doc-$(3)) +check-stage$(1)-T-$(2)-H-$(3)-doc-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)) -$$(call TEST_OK_FILE,$(1),$(2),$(2),doc-$(3)): \ - $$(TEST_SREQ$(1)_T_$(2)_H_$(2)) \ - $$(HBIN$(1)_H_$(2))/rustdoc$$(X_$(2)) - @$$(call E, run doc-$(3) [$(2)]) - $$(Q)$$(HBIN$(1)_H_$(2))/rustdoc$$(X_$(2)) --test \ - $$(CRATE_DOC_LIB-$(3)) && touch $$@ +ifeq ($(2),$$(CFG_BUILD)) +$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): \ + $$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \ + $$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) + @$$(call E, run doc-$(4) [$(2)]) + $$(Q)$$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) --test \ + $$(CRATE_DOC_LIB-$(4)) && touch $$@ +else +$$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): + touch $$@ +endif endef $(foreach host,$(CFG_HOST), \ - $(foreach stage,$(STAGES), \ - $(foreach crate,$(TEST_DOC_CRATES), \ - $(eval $(call DEF_CRATE_DOC_TEST,$(stage),$(host),$(crate)))))) + $(foreach target,$(CFG_TARGET), \ + $(foreach stage,$(STAGES), \ + $(foreach crate,$(TEST_DOC_CRATES), \ + $(eval $(call DEF_CRATE_DOC_TEST,$(stage),$(target),$(host),$(crate))))))) ###################################################################### # Extracting tests for docs |
