Fix the dependency for the pretty-rpass-full tests
The current code attempts to define the PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full variable, which does not work, because $(1) and $(3) are not inside a function. Moreover, there is a test (run-pass-fulldeps/compiler-calls.rs) that uses rustc_driver, which is not an indirect dependency of librustc or libsyntax. Listing all the dependencies will be hard to maintain, but there's a better way to do this... As with the rpass-full and cfail-full tests, add dependencies using the $$(CSREQ$(1)_T_$(3)_H_$(3)) variable, which includes the complete set of host and target crates, built for a particular stage and host. We use T_$(3), not T_$(2), because we only build LLVM for host triples (not target triples), so we can only build rustc_llvm for host triples. The fulldeps tests that use plugins need host rustc crates, whereas fulldeps tests that link against rustc and run should be skipped for cross-compilation (such as Android). Fixes #22021
This commit is contained in:
parent
7fbedc58e3
commit
b7ab2aeebd
18
mk/tests.mk
18
mk/tests.mk
|
@ -753,13 +753,6 @@ PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
|
||||||
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
|
PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
|
||||||
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
|
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
|
||||||
PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
|
PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
|
||||||
# The stage- and host-specific dependencies are for e.g. macro_crate_test which pulls in
|
|
||||||
# external crates.
|
|
||||||
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass =
|
|
||||||
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full = $$(HLIB$(1)_H_$(3))/stamp.syntax $$(HLIB$(1)_H_$(3))/stamp.rustc
|
|
||||||
PRETTY_DEPS$(1)_H_$(3)_pretty-rfail =
|
|
||||||
PRETTY_DEPS$(1)_H_$(3)_pretty-bench =
|
|
||||||
PRETTY_DEPS$(1)_H_$(3)_pretty-pretty =
|
|
||||||
PRETTY_DIRNAME_pretty-rpass = run-pass
|
PRETTY_DIRNAME_pretty-rpass = run-pass
|
||||||
PRETTY_DIRNAME_pretty-rpass-valgrind = run-pass-valgrind
|
PRETTY_DIRNAME_pretty-rpass-valgrind = run-pass-valgrind
|
||||||
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
|
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
|
||||||
|
@ -767,6 +760,15 @@ PRETTY_DIRNAME_pretty-rfail = run-fail
|
||||||
PRETTY_DIRNAME_pretty-bench = bench
|
PRETTY_DIRNAME_pretty-bench = bench
|
||||||
PRETTY_DIRNAME_pretty-pretty = pretty
|
PRETTY_DIRNAME_pretty-pretty = pretty
|
||||||
|
|
||||||
|
define DEF_PRETTY_FULLDEPS
|
||||||
|
PRETTY_DEPS$(1)_T_$(2)_H_$(3)_pretty-rpass-full = $$(CSREQ$(1)_T_$(3)_H_$(3))
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(foreach host,$(CFG_HOST), \
|
||||||
|
$(foreach target,$(CFG_TARGET), \
|
||||||
|
$(foreach stage,$(STAGES), \
|
||||||
|
$(eval $(call DEF_PRETTY_FULLDEPS,$(stage),$(target),$(host))))))
|
||||||
|
|
||||||
define DEF_RUN_PRETTY_TEST
|
define DEF_RUN_PRETTY_TEST
|
||||||
|
|
||||||
PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
|
PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
|
||||||
|
@ -780,7 +782,7 @@ check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4
|
||||||
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
|
$$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
|
||||||
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
$$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
|
||||||
$$(PRETTY_DEPS_$(4)) \
|
$$(PRETTY_DEPS_$(4)) \
|
||||||
$$(PRETTY_DEPS$(1)_H_$(3)_$(4))
|
$$(PRETTY_DEPS$(1)_T_$(2)_H_$(3)_$(4))
|
||||||
@$$(call E, run pretty-rpass [$(2)]: $$<)
|
@$$(call E, run pretty-rpass [$(2)]: $$<)
|
||||||
$$(Q)touch $$@.start_time
|
$$(Q)touch $$@.start_time
|
||||||
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
|
$$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
|
||||||
|
|
Loading…
Reference in New Issue