1 # Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2 # file at the top-level directory of this distribution and at
3 # http://rust-lang.org/COPYRIGHT.
5 # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 # option. This file may not be copied, modified, or distributed
9 # except according to those terms.
12 ######################################################################
14 ######################################################################
16 # The names of crates that must be tested
18 # libcore/libunicode tests are in a separate crate
20 $(eval $(call RUST_CRATE,coretest))
22 TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
23 TEST_DOC_CRATES = $(DOC_CRATES)
24 TEST_HOST_CRATES = $(filter-out rustc_typeck rustc_borrowck rustc_resolve rustc_trans,\
26 TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
28 ######################################################################
29 # Environment configuration
30 ######################################################################
32 # The arguments to all test runners
34 TESTARGS += $(TESTNAME)
43 # Arguments to the cfail/rfail/rpass/bench tests
45 CTEST_RUNTOOL = --runtool "$(CFG_VALGRIND)"
53 # Arguments to the perf tests
55 CTEST_PERF_RUNTOOL = --runtool "$(CFG_PERF_TOOL)"
58 CTEST_TESTARGS := $(TESTARGS)
61 CTEST_TESTARGS += --verbose
64 # Setting locale ensures that gdb's output remains consistent.
65 # This prevents tests from failing with some locales (fixes #17423).
68 # If we're running perf then set this environment variable
69 # to put the benchmarks into 'hard mode'
70 ifeq ($(MAKECMDGOALS),perf)
74 TEST_LOG_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
75 TEST_OK_FILE=tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).ok
77 define DEF_TARGET_COMMANDS
80 CFG_RUN_TEST_$(1)=$$(TARGET_RPATH_VAR$$(2)_T_$$(3)_H_$$(4)) \
81 $$(call CFG_RUN_$(1),,$$(CFG_VALGRIND) $$(1))
84 ifdef CFG_WINDOWSY_$(1)
85 CFG_TESTLIB_$(1)=$$(CFG_BUILD_DIR)$$(2)/$$(strip \
86 $$(if $$(findstring stage0,$$(1)), \
87 stage0/$$(CFG_LIBDIR_RELATIVE), \
88 $$(if $$(findstring stage1,$$(1)), \
89 stage1/$$(CFG_LIBDIR_RELATIVE), \
90 $$(if $$(findstring stage2,$$(1)), \
91 stage2/$$(CFG_LIBDIR_RELATIVE), \
92 $$(if $$(findstring stage3,$$(1)), \
93 stage3/$$(CFG_LIBDIR_RELATIVE), \
94 )))))/rustlib/$$(CFG_BUILD)/lib
95 CFG_RUN_TEST_$(1)=$$(call CFG_RUN_$(1),$$(call CFG_TESTLIB_$(1),$$(1),$$(4)),$$(1))
98 # Run the compiletest runner itself under valgrind
100 CFG_RUN_CTEST_$(1)=$$(RPATH_VAR$$(1)_T_$$(3)_H_$$(3)) \
101 $$(call CFG_RUN_TEST_$$(CFG_BUILD),$$(3),$$(4))
103 CFG_RUN_CTEST_$(1)=$$(RPATH_VAR$$(1)_T_$$(3)_H_$$(3)) \
104 $$(call CFG_RUN_$$(CFG_BUILD),$$(TLIB$$(1)_T_$$(3)_H_$$(3)),$$(2))
109 $(foreach target,$(CFG_TARGET), \
110 $(eval $(call DEF_TARGET_COMMANDS,$(target))))
112 # Target platform specific variables
113 # for arm-linux-androidabi
114 define DEF_ADB_DEVICE_STATUS
115 CFG_ADB_DEVICE_STATUS=$(1)
118 $(foreach target,$(CFG_TARGET), \
119 $(if $(findstring $(target),"arm-linux-androideabi"), \
120 $(if $(findstring adb,$(CFG_ADB)), \
121 $(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[:_A-Za-z0-9-]+[[:blank:]]+device')), \
122 $(info check: android device attached) \
123 $(eval $(call DEF_ADB_DEVICE_STATUS, true)), \
124 $(info check: android device not attached) \
125 $(eval $(call DEF_ADB_DEVICE_STATUS, false)) \
127 $(info check: adb not found) \
128 $(eval $(call DEF_ADB_DEVICE_STATUS, false)) \
133 ifeq ($(CFG_ADB_DEVICE_STATUS),true)
134 CFG_ADB_TEST_DIR=/data/tmp
136 $(info check: android device test dir $(CFG_ADB_TEST_DIR) ready \
137 $(shell $(CFG_ADB) remount 1>/dev/null) \
138 $(shell $(CFG_ADB) shell rm -r $(CFG_ADB_TEST_DIR) >/dev/null) \
139 $(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)) \
140 $(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)/tmp) \
141 $(shell $(CFG_ADB) push $(S)src/etc/adb_run_wrapper.sh $(CFG_ADB_TEST_DIR) 1>/dev/null) \
142 $(foreach crate,$(TARGET_CRATES), \
143 $(shell $(CFG_ADB) push $(TLIB2_T_arm-linux-androideabi_H_$(CFG_BUILD))/$(call CFG_LIB_GLOB_arm-linux-androideabi,$(crate)) \
144 $(CFG_ADB_TEST_DIR))) \
151 ######################################################################
153 ######################################################################
155 # The main testing target. Tests lots of stuff.
156 check: cleantmptestlogs cleantestlibs check-notidy tidy
158 # As above but don't bother running tidy.
159 check-notidy: cleantmptestlogs cleantestlibs all check-stage2
160 $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
162 # A slightly smaller set of tests for smoke testing.
163 check-lite: cleantestlibs cleantmptestlogs \
164 $(foreach crate,$(TEST_TARGET_CRATES),check-stage2-$(crate)) \
165 check-stage2-rpass check-stage2-rpass-valgrind \
166 check-stage2-rfail check-stage2-cfail check-stage2-rmake
167 $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
169 # Only check the 'reference' tests: rpass/cfail/rfail/rmake.
170 check-ref: cleantestlibs cleantmptestlogs check-stage2-rpass check-stage2-rpass-valgrind \
171 check-stage2-rfail check-stage2-cfail check-stage2-rmake
172 $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
174 # Only check the docs.
175 check-docs: cleantestlibs cleantmptestlogs check-stage2-docs
176 $(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
178 # Some less critical tests that are not prone to breakage.
179 # Not run as part of the normal test suite, but tested by bors on checkin.
180 check-secondary: check-build-compiletest check-build-lexer-verifier check-lexer check-pretty
182 # check + check-secondary.
184 # Issue #17883: build check-secondary first so hidden dependencies in
185 # e.g. building compiletest are exercised (resolve those by adding
186 # deps to rules that need them; not by putting `check` first here).
187 check-all: check-secondary check
189 # Pretty-printing tests.
190 check-pretty: check-stage2-T-$(CFG_BUILD)-H-$(CFG_BUILD)-pretty-exec
192 define DEF_CHECK_BUILD_COMPILETEST_FOR_STAGE
193 check-stage$(1)-build-compiletest: $$(HBIN$(1)_H_$(CFG_BUILD))/compiletest$$(X_$(CFG_BUILD))
196 $(foreach stage,$(STAGES), \
197 $(eval $(call DEF_CHECK_BUILD_COMPILETEST_FOR_STAGE,$(stage))))
199 check-build-compiletest: \
200 check-stage1-build-compiletest \
201 check-stage2-build-compiletest
203 .PHONY: cleantmptestlogs cleantestlibs
209 $(Q)find $(CFG_BUILD)/test \
210 -name '*.[odasS]' -o \
217 -name '*.libaux' -o \
220 -name '*.debugger.script' \
224 ######################################################################
226 ######################################################################
232 ALL_CS := $(wildcard $(S)src/rt/*.cpp \
234 $(S)src/rt/*/*/*.cpp \
235 $(S)src/rustllvm/*.cpp)
236 ALL_CS := $(filter-out $(S)src/rt/miniz.cpp \
237 $(wildcard $(S)src/rt/hoedown/src/*.c) \
238 $(wildcard $(S)src/rt/hoedown/bin/*.c) \
240 ALL_HS := $(wildcard $(S)src/rt/*.h \
243 $(S)src/rustllvm/*.h)
244 ALL_HS := $(filter-out $(S)src/rt/valgrind/valgrind.h \
245 $(S)src/rt/valgrind/memcheck.h \
246 $(S)src/rt/msvc/typeof.h \
247 $(S)src/rt/msvc/stdint.h \
248 $(S)src/rt/msvc/inttypes.h \
249 $(wildcard $(S)src/rt/hoedown/src/*.h) \
250 $(wildcard $(S)src/rt/hoedown/bin/*.h) \
253 # Run the tidy script in multiple parts to avoid huge 'echo' commands
255 @$(call E, check: formatting)
256 $(Q)find $(S)src -name '*.r[sc]' \
257 -and -not -regex '^$(S)src/jemalloc.*' \
258 -and -not -regex '^$(S)src/libuv.*' \
259 -and -not -regex '^$(S)src/llvm.*' \
260 -and -not -regex '^$(S)src/gyp.*' \
261 -and -not -regex '^$(S)src/libbacktrace.*' \
263 | xargs -0 -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
264 $(Q)find $(S)src/etc -name '*.py' \
265 | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
266 $(Q)find $(S)src/doc -name '*.js' \
267 | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
268 $(Q)find $(S)src/etc -name '*.sh' \
269 | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
270 $(Q)find $(S)src/etc -name '*.pl' \
271 | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
272 $(Q)find $(S)src/etc -name '*.c' \
273 | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
274 $(Q)find $(S)src/etc -name '*.h' \
275 | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
277 | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
279 | xargs -n 10 $(CFG_PYTHON) $(S)src/etc/tidy.py
280 $(Q)find $(S)src -type f -perm +a+x \
281 -not -name '*.rs' -and -not -name '*.py' \
282 -and -not -name '*.sh' \
283 | grep '^$(S)src/jemalloc' -v \
284 | grep '^$(S)src/libuv' -v \
285 | grep '^$(S)src/llvm' -v \
286 | grep '^$(S)src/rt/hoedown' -v \
287 | grep '^$(S)src/gyp' -v \
288 | grep '^$(S)src/etc' -v \
289 | grep '^$(S)src/doc' -v \
290 | grep '^$(S)src/compiler-rt' -v \
291 | grep '^$(S)src/libbacktrace' -v \
292 | grep '^$(S)src/rust-installer' -v \
293 | xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
298 ######################################################################
300 ######################################################################
304 check-stage$(1)-T-$(2)-H-$(3)-exec: \
305 check-stage$(1)-T-$(2)-H-$(3)-rpass-exec \
306 check-stage$(1)-T-$(2)-H-$(3)-rfail-exec \
307 check-stage$(1)-T-$(2)-H-$(3)-cfail-exec \
308 check-stage$(1)-T-$(2)-H-$(3)-rpass-valgrind-exec \
309 check-stage$(1)-T-$(2)-H-$(3)-rpass-full-exec \
310 check-stage$(1)-T-$(2)-H-$(3)-cfail-full-exec \
311 check-stage$(1)-T-$(2)-H-$(3)-rmake-exec \
312 check-stage$(1)-T-$(2)-H-$(3)-crates-exec \
313 check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec \
314 check-stage$(1)-T-$(2)-H-$(3)-bench-exec \
315 check-stage$(1)-T-$(2)-H-$(3)-debuginfo-gdb-exec \
316 check-stage$(1)-T-$(2)-H-$(3)-debuginfo-lldb-exec \
317 check-stage$(1)-T-$(2)-H-$(3)-codegen-exec \
318 check-stage$(1)-T-$(2)-H-$(3)-doc-exec \
319 check-stage$(1)-T-$(2)-H-$(3)-pretty-exec
321 # Only test the compiler-dependent crates when the target is
322 # able to build a compiler (when the target triple is in the set of host triples)
323 ifneq ($$(findstring $(2),$$(CFG_HOST)),)
325 check-stage$(1)-T-$(2)-H-$(3)-crates-exec: \
326 $$(foreach crate,$$(TEST_CRATES), \
327 check-stage$(1)-T-$(2)-H-$(3)-$$(crate)-exec)
331 check-stage$(1)-T-$(2)-H-$(3)-crates-exec: \
332 $$(foreach crate,$$(TEST_TARGET_CRATES), \
333 check-stage$(1)-T-$(2)-H-$(3)-$$(crate)-exec)
337 check-stage$(1)-T-$(2)-H-$(3)-doc-crates-exec: \
338 $$(foreach crate,$$(TEST_DOC_CRATES), \
339 check-stage$(1)-T-$(2)-H-$(3)-doc-crate-$$(crate)-exec)
341 check-stage$(1)-T-$(2)-H-$(3)-doc-exec: \
342 $$(foreach docname,$$(DOCS), \
343 check-stage$(1)-T-$(2)-H-$(3)-doc-$$(docname)-exec)
345 check-stage$(1)-T-$(2)-H-$(3)-pretty-exec: \
346 check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-exec \
347 check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-valgrind-exec \
348 check-stage$(1)-T-$(2)-H-$(3)-pretty-rpass-full-exec \
349 check-stage$(1)-T-$(2)-H-$(3)-pretty-rfail-exec \
350 check-stage$(1)-T-$(2)-H-$(3)-pretty-bench-exec \
351 check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty-exec
355 $(foreach host,$(CFG_HOST), \
356 $(foreach target,$(CFG_TARGET), \
357 $(foreach stage,$(STAGES), \
358 $(eval $(call DEF_TEST_SETS,$(stage),$(target),$(host))))))
361 ######################################################################
363 ######################################################################
367 # If NO_REBUILD is set then break the dependencies on everything but
368 # the source files so we can test crates without rebuilding any of the
370 ifeq ($(NO_REBUILD),)
371 TESTDEP_$(1)_$(2)_$(3)_$(4) = $$(SREQ$(1)_T_$(2)_H_$(3)) \
372 $$(foreach crate,$$(TARGET_CRATES), \
373 $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(crate)) \
374 $$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4))
377 TESTDEP_$(1)_$(2)_$(3)_$(4) = $$(RSINPUTS_$(4))
380 $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): CFG_COMPILER_HOST_TRIPLE = $(2)
381 $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
383 $$(TESTDEP_$(1)_$(2)_$(3)_$(4))
384 @$$(call E, rustc: $$@)
385 $(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
386 $$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
387 -L "$$(RT_OUTPUT_DIR_$(2))" \
388 -L "$$(LLVM_LIBDIR_$(2))" \
393 $(foreach host,$(CFG_HOST), \
394 $(eval $(foreach target,$(CFG_TARGET), \
395 $(eval $(foreach stage,$(STAGES), \
396 $(eval $(foreach crate,$(TEST_CRATES), \
397 $(eval $(call TEST_RUNNER,$(stage),$(target),$(host),$(crate))))))))))
399 define DEF_TEST_CRATE_RULES
400 check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
402 $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
403 $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
404 @$$(call E, run: $$<)
405 $$(Q)$$(call CFG_RUN_TEST_$(2),$$<,$(1),$(2),$(3)) $$(TESTARGS) \
406 --logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
407 $$(call CRATE_TEST_EXTRA_ARGS,$(1),$(2),$(3),$(4)) \
411 define DEF_TEST_CRATE_RULES_arm-linux-androideabi
412 check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
414 $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
415 $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
416 @$$(call E, run: $$< via adb)
417 $$(Q)$(CFG_ADB) push $$< $(CFG_ADB_TEST_DIR)
418 $$(Q)$(CFG_ADB) shell '(cd $(CFG_ADB_TEST_DIR); LD_LIBRARY_PATH=. \
420 --logfile $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log \
421 $$(call CRATE_TEST_EXTRA_ARGS,$(1),$(2),$(3),$(4)) $(TESTARGS))' \
422 > tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp
423 $$(Q)cat tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp
424 $$(Q)touch tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
425 $$(Q)$(CFG_ADB) pull $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log tmp/
426 $$(Q)$(CFG_ADB) shell rm $(CFG_ADB_TEST_DIR)/check-stage$(1)-T-$(2)-H-$(3)-$(4).log
427 @if grep -q "result: ok" tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
429 rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
432 rm tmp/check-stage$(1)-T-$(2)-H-$(3)-$(4).tmp; \
437 define DEF_TEST_CRATE_RULES_null
438 check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
440 $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
441 $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2))
442 @$$(call E, failing: no device for $$< )
446 $(foreach host,$(CFG_HOST), \
447 $(foreach target,$(CFG_TARGET), \
448 $(foreach stage,$(STAGES), \
449 $(foreach crate, $(TEST_CRATES), \
450 $(if $(findstring $(target),$(CFG_BUILD)), \
451 $(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))), \
452 $(if $(findstring $(target),"arm-linux-androideabi"), \
453 $(if $(findstring $(CFG_ADB_DEVICE_STATUS),"true"), \
454 $(eval $(call DEF_TEST_CRATE_RULES_arm-linux-androideabi,$(stage),$(target),$(host),$(crate))), \
455 $(eval $(call DEF_TEST_CRATE_RULES_null,$(stage),$(target),$(host),$(crate))) \
457 $(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))) \
460 ######################################################################
461 # Rules for the compiletest tests (rpass, rfail, etc.)
462 ######################################################################
464 RPASS_RS := $(wildcard $(S)src/test/run-pass/*.rs)
465 RPASS_VALGRIND_RS := $(wildcard $(S)src/test/run-pass-valgrind/*.rs)
466 RPASS_FULL_RS := $(wildcard $(S)src/test/run-pass-fulldeps/*.rs)
467 CFAIL_FULL_RS := $(wildcard $(S)src/test/compile-fail-fulldeps/*.rs)
468 RFAIL_RS := $(wildcard $(S)src/test/run-fail/*.rs)
469 CFAIL_RS := $(wildcard $(S)src/test/compile-fail/*.rs)
470 BENCH_RS := $(wildcard $(S)src/test/bench/*.rs)
471 PRETTY_RS := $(wildcard $(S)src/test/pretty/*.rs)
472 DEBUGINFO_GDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
473 DEBUGINFO_LLDB_RS := $(wildcard $(S)src/test/debuginfo/*.rs)
474 CODEGEN_RS := $(wildcard $(S)src/test/codegen/*.rs)
475 CODEGEN_CC := $(wildcard $(S)src/test/codegen/*.cc)
477 # perf tests are the same as bench tests only they run under
478 # a performance monitor.
479 PERF_RS := $(wildcard $(S)src/test/bench/*.rs)
481 RPASS_TESTS := $(RPASS_RS)
482 RPASS_VALGRIND_TESTS := $(RPASS_VALGRIND_RS)
483 RPASS_FULL_TESTS := $(RPASS_FULL_RS)
484 CFAIL_FULL_TESTS := $(CFAIL_FULL_RS)
485 RFAIL_TESTS := $(RFAIL_RS)
486 CFAIL_TESTS := $(CFAIL_RS)
487 BENCH_TESTS := $(BENCH_RS)
488 PERF_TESTS := $(PERF_RS)
489 PRETTY_TESTS := $(PRETTY_RS)
490 DEBUGINFO_GDB_TESTS := $(DEBUGINFO_GDB_RS)
491 DEBUGINFO_LLDB_TESTS := $(DEBUGINFO_LLDB_RS)
492 CODEGEN_TESTS := $(CODEGEN_RS) $(CODEGEN_CC)
494 CTEST_SRC_BASE_rpass = run-pass
495 CTEST_BUILD_BASE_rpass = run-pass
496 CTEST_MODE_rpass = run-pass
497 CTEST_RUNTOOL_rpass = $(CTEST_RUNTOOL)
499 CTEST_SRC_BASE_rpass-valgrind = run-pass-valgrind
500 CTEST_BUILD_BASE_rpass-valgrind = run-pass-valgrind
501 CTEST_MODE_rpass-valgrind = run-pass-valgrind
502 CTEST_RUNTOOL_rpass-valgrind = $(CTEST_RUNTOOL)
504 CTEST_SRC_BASE_rpass-full = run-pass-fulldeps
505 CTEST_BUILD_BASE_rpass-full = run-pass-fulldeps
506 CTEST_MODE_rpass-full = run-pass
507 CTEST_RUNTOOL_rpass-full = $(CTEST_RUNTOOL)
509 CTEST_SRC_BASE_cfail-full = compile-fail-fulldeps
510 CTEST_BUILD_BASE_cfail-full = compile-fail-fulldeps
511 CTEST_MODE_cfail-full = compile-fail
512 CTEST_RUNTOOL_cfail-full = $(CTEST_RUNTOOL)
514 CTEST_SRC_BASE_rfail = run-fail
515 CTEST_BUILD_BASE_rfail = run-fail
516 CTEST_MODE_rfail = run-fail
517 CTEST_RUNTOOL_rfail = $(CTEST_RUNTOOL)
519 CTEST_SRC_BASE_cfail = compile-fail
520 CTEST_BUILD_BASE_cfail = compile-fail
521 CTEST_MODE_cfail = compile-fail
522 CTEST_RUNTOOL_cfail = $(CTEST_RUNTOOL)
524 CTEST_SRC_BASE_bench = bench
525 CTEST_BUILD_BASE_bench = bench
526 CTEST_MODE_bench = run-pass
527 CTEST_RUNTOOL_bench = $(CTEST_RUNTOOL)
529 CTEST_SRC_BASE_perf = bench
530 CTEST_BUILD_BASE_perf = perf
531 CTEST_MODE_perf = run-pass
532 CTEST_RUNTOOL_perf = $(CTEST_PERF_RUNTOOL)
534 CTEST_SRC_BASE_debuginfo-gdb = debuginfo
535 CTEST_BUILD_BASE_debuginfo-gdb = debuginfo-gdb
536 CTEST_MODE_debuginfo-gdb = debuginfo-gdb
537 CTEST_RUNTOOL_debuginfo-gdb = $(CTEST_RUNTOOL)
539 CTEST_SRC_BASE_debuginfo-lldb = debuginfo
540 CTEST_BUILD_BASE_debuginfo-lldb = debuginfo-lldb
541 CTEST_MODE_debuginfo-lldb = debuginfo-lldb
542 CTEST_RUNTOOL_debuginfo-lldb = $(CTEST_RUNTOOL)
544 CTEST_SRC_BASE_codegen = codegen
545 CTEST_BUILD_BASE_codegen = codegen
546 CTEST_MODE_codegen = codegen
547 CTEST_RUNTOOL_codegen = $(CTEST_RUNTOOL)
549 # CTEST_DISABLE_$(TEST_GROUP), if set, will cause the test group to be
550 # disabled and the associated message to be printed as a warning
551 # during attempts to run those tests.
554 CTEST_DISABLE_debuginfo-gdb = "no gdb found"
558 CTEST_DISABLE_debuginfo-lldb = "no lldb found"
562 CTEST_DISABLE_codegen = "no clang found"
565 ifneq ($(CFG_OSTYPE),apple-darwin)
566 CTEST_DISABLE_debuginfo-lldb = "lldb tests are only run on darwin"
569 ifeq ($(CFG_OSTYPE),apple-darwin)
570 CTEST_DISABLE_debuginfo-gdb = "gdb on darwin needs root"
573 # CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that
574 # test group to be disabled *unless* the target is able to build a
575 # compiler (i.e. when the target triple is in the set of of host
576 # triples). The associated message will be printed as a warning
577 # during attempts to run those tests.
579 define DEF_CTEST_VARS
581 # All the per-stage build rules you might want to call from the
584 # $(1) is the stage number
585 # $(2) is the target triple to test
586 # $(3) is the host triple to test
588 # Prerequisites for compiletest tests
589 TEST_SREQ$(1)_T_$(2)_H_$(3) = \
590 $$(HBIN$(1)_H_$(3))/compiletest$$(X_$(3)) \
591 $$(SREQ$(1)_T_$(2)_H_$(3))
593 # Rules for the cfail/rfail/rpass/bench/perf test runner
595 # The tests select when to use debug configuration on their own;
596 # remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
597 CTEST_RUSTC_FLAGS := $$(subst --cfg ndebug,,$$(CFG_RUSTC_FLAGS))
599 # The tests cannot be optimized while the rest of the compiler is optimized, so
600 # filter out the optimization (if any) from rustc and then figure out if we need
602 CTEST_RUSTC_FLAGS := $$(subst -O,,$$(CTEST_RUSTC_FLAGS))
603 ifndef CFG_DISABLE_OPTIMIZE_TESTS
604 CTEST_RUSTC_FLAGS += -O
608 CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
609 --compile-lib-path $$(HLIB$(1)_H_$(3)) \
610 --run-lib-path $$(TLIB$(1)_T_$(2)_H_$(3)) \
611 --rustc-path $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
612 --clang-path $(if $(CFG_CLANG),$(CFG_CLANG),clang) \
613 --llvm-bin-path $(CFG_LLVM_INST_DIR_$(CFG_BUILD))/bin \
614 --aux-base $$(S)src/test/auxiliary/ \
615 --stage-id stage$(1)-$(2) \
618 --gdb-version="$(CFG_GDB_VERSION)" \
619 --lldb-version="$(CFG_LLDB_VERSION)" \
620 --android-cross-path=$(CFG_ANDROID_CROSS_PATH) \
621 --adb-path=$(CFG_ADB) \
622 --adb-test-dir=$(CFG_ADB_TEST_DIR) \
623 --host-rustcflags "$(RUSTC_FLAGS_$(3)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(3))" \
624 --lldb-python-dir=$(CFG_LLDB_PYTHON_DIR) \
625 --target-rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) -L $$(RT_OUTPUT_DIR_$(2))" \
628 ifdef CFG_VALGRIND_RPASS
629 ifdef GOOD_VALGRIND_$(2)
630 $(info cfg: valgrind-path set to $(CFG_VALGRIND_RPASS))
631 CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) += --valgrind-path "$(CFG_VALGRIND_RPASS)"
635 ifndef CFG_DISABLE_VALGRIND_RPASS
636 ifdef GOOD_VALGRIND_$(2)
637 CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) += --force-valgrind
641 CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)
642 CTEST_DEPS_rpass-valgrind_$(1)-T-$(2)-H-$(3) = $$(RPASS_VALGRIND_TESTS)
643 CTEST_DEPS_rpass-full_$(1)-T-$(2)-H-$(3) = $$(RPASS_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
644 CTEST_DEPS_cfail-full_$(1)-T-$(2)-H-$(3) = $$(CFAIL_FULL_TESTS) $$(CSREQ$(1)_T_$(3)_H_$(3)) $$(SREQ$(1)_T_$(2)_H_$(3))
645 CTEST_DEPS_rfail_$(1)-T-$(2)-H-$(3) = $$(RFAIL_TESTS)
646 CTEST_DEPS_cfail_$(1)-T-$(2)-H-$(3) = $$(CFAIL_TESTS)
647 CTEST_DEPS_bench_$(1)-T-$(2)-H-$(3) = $$(BENCH_TESTS)
648 CTEST_DEPS_perf_$(1)-T-$(2)-H-$(3) = $$(PERF_TESTS)
649 CTEST_DEPS_debuginfo-gdb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_GDB_TESTS)
650 CTEST_DEPS_debuginfo-lldb_$(1)-T-$(2)-H-$(3) = $$(DEBUGINFO_LLDB_TESTS) \
651 $(S)src/etc/lldb_batchmode.py \
652 $(S)src/etc/lldb_rust_formatters.py
653 CTEST_DEPS_codegen_$(1)-T-$(2)-H-$(3) = $$(CODEGEN_TESTS)
657 $(foreach host,$(CFG_HOST), \
658 $(eval $(foreach target,$(CFG_TARGET), \
659 $(eval $(foreach stage,$(STAGES), \
660 $(eval $(call DEF_CTEST_VARS,$(stage),$(target),$(host))))))))
662 define DEF_RUN_COMPILETEST
664 CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
665 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
666 --src-base $$(S)src/test/$$(CTEST_SRC_BASE_$(4))/ \
667 --build-base $(3)/test/$$(CTEST_BUILD_BASE_$(4))/ \
668 --mode $$(CTEST_MODE_$(4)) \
669 $$(CTEST_RUNTOOL_$(4))
671 check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
673 # CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4)
674 # Goal: leave this variable as empty string if we should run the test.
675 # Otherwise, set it to the reason we are not running the test.
676 # (Encoded as a separate variable because GNU make does not have a
677 # good way to express OR on ifeq commands)
679 ifneq ($$(CTEST_DISABLE_$(4)),)
680 # Test suite is disabled for all configured targets.
681 CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4) := $$(CTEST_DISABLE_$(4))
683 # else, check if non-self-hosted target (i.e. target not-in hosts) ...
684 ifeq ($$(findstring $(2),$$(CFG_HOST)),)
685 # ... if so, then check if this test suite is disabled for non-selfhosts.
686 ifneq ($$(CTEST_DISABLE_NONSELFHOST_$(4)),)
687 # Test suite is disabled for this target.
688 CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4) := $$(CTEST_DISABLE_NONSELFHOST_$(4))
691 # Neither DISABLE nor DISABLE_NONSELFHOST is set ==> okay, run the test.
694 ifeq ($$(CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4)),)
695 $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
696 $$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
697 $$(CTEST_DEPS_$(4)_$(1)-T-$(2)-H-$(3))
698 @$$(call E, run $(4) [$(2)]: $$<)
699 $$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
700 $$(CTEST_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
701 --logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
706 $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)):
707 @$$(call E, run $(4) [$(2)]: $$<)
708 @$$(call E, warning: tests disabled: $$(CTEST_DONT_RUN_$(1)-T-$(2)-H-$(3)-$(4)))
715 CTEST_NAMES = rpass rpass-valgrind rpass-full cfail-full rfail cfail bench perf debuginfo-gdb debuginfo-lldb codegen
717 $(foreach host,$(CFG_HOST), \
718 $(eval $(foreach target,$(CFG_TARGET), \
719 $(eval $(foreach stage,$(STAGES), \
720 $(eval $(foreach name,$(CTEST_NAMES), \
721 $(eval $(call DEF_RUN_COMPILETEST,$(stage),$(target),$(host),$(name))))))))))
723 PRETTY_NAMES = pretty-rpass pretty-rpass-valgrind pretty-rpass-full pretty-rfail pretty-bench pretty-pretty
724 PRETTY_DEPS_pretty-rpass = $(RPASS_TESTS)
725 PRETTY_DEPS_pretty-rpass-valgrind = $(RPASS_VALGRIND_TESTS)
726 PRETTY_DEPS_pretty-rpass-full = $(RPASS_FULL_TESTS)
727 PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
728 PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
729 PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
730 # The stage- and host-specific dependencies are for e.g. macro_crate_test which pulls in
732 PRETTY_DEPS$(1)_H_$(3)_pretty-rpass =
733 PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full = $$(HLIB$(1)_H_$(3))/stamp.syntax $$(HLIB$(1)_H_$(3))/stamp.rustc
734 PRETTY_DEPS$(1)_H_$(3)_pretty-rfail =
735 PRETTY_DEPS$(1)_H_$(3)_pretty-bench =
736 PRETTY_DEPS$(1)_H_$(3)_pretty-pretty =
737 PRETTY_DIRNAME_pretty-rpass = run-pass
738 PRETTY_DIRNAME_pretty-rpass-valgrind = run-pass-valgrind
739 PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
740 PRETTY_DIRNAME_pretty-rfail = run-fail
741 PRETTY_DIRNAME_pretty-bench = bench
742 PRETTY_DIRNAME_pretty-pretty = pretty
744 define DEF_RUN_PRETTY_TEST
746 PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4) := \
747 $$(CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3)) \
748 --src-base $$(S)src/test/$$(PRETTY_DIRNAME_$(4))/ \
749 --build-base $(3)/test/$$(PRETTY_DIRNAME_$(4))/ \
752 check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4))
754 $$(call TEST_OK_FILE,$(1),$(2),$(3),$(4)): \
755 $$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
756 $$(PRETTY_DEPS_$(4)) \
757 $$(PRETTY_DEPS$(1)_H_$(3)_$(4))
758 @$$(call E, run pretty-rpass [$(2)]: $$<)
759 $$(Q)$$(call CFG_RUN_CTEST_$(2),$(1),$$<,$(3)) \
760 $$(PRETTY_ARGS$(1)-T-$(2)-H-$(3)-$(4)) \
761 --logfile $$(call TEST_LOG_FILE,$(1),$(2),$(3),$(4)) \
766 $(foreach host,$(CFG_HOST), \
767 $(foreach target,$(CFG_TARGET), \
768 $(foreach stage,$(STAGES), \
769 $(foreach pretty-name,$(PRETTY_NAMES), \
770 $(eval $(call DEF_RUN_PRETTY_TEST,$(stage),$(target),$(host),$(pretty-name)))))))
773 ######################################################################
774 # Crate & freestanding documentation tests
775 ######################################################################
778 RUSTDOC_EXE_$(1)_T_$(2)_H_$(3) := $$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3))
779 RUSTDOC_$(1)_T_$(2)_H_$(3) := $$(RPATH_VAR$(1)_T_$(2)_H_$(3)) $$(RUSTDOC_EXE_$(1)_T_$(2)_H_$(3))
782 $(foreach host,$(CFG_HOST), \
783 $(foreach target,$(CFG_TARGET), \
784 $(foreach stage,$(STAGES), \
785 $(eval $(call DEF_RUSTDOC,$(stage),$(target),$(host))))))
791 check-stage$(1)-T-$(2)-H-$(3)-doc-$(4)-exec: $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4))
793 # If NO_REBUILD is set then break the dependencies on everything but
794 # the source files so we can test documentation without rebuilding
796 ifeq ($(NO_REBUILD),)
797 DOCTESTDEP_$(1)_$(2)_$(3)_$(4) = \
799 $$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
800 $$(RUSTDOC_EXE_$(1)_T_$(2)_H_$(3))
802 DOCTESTDEP_$(1)_$(2)_$(3)_$(4) = $$(D)/$(4).md
805 ifeq ($(2),$$(CFG_BUILD))
806 $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)): $$(DOCTESTDEP_$(1)_$(2)_$(3)_$(4))
807 @$$(call E, run doc-$(4) [$(2)])
808 $$(Q)$$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --cfg dox --test $$< --test-args "$$(TESTARGS)" && touch $$@
810 $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-$(4)):
815 $(foreach host,$(CFG_HOST), \
816 $(foreach target,$(CFG_TARGET), \
817 $(foreach stage,$(STAGES), \
818 $(foreach docname,$(DOCS), \
819 $(eval $(call DEF_DOC_TEST,$(stage),$(target),$(host),$(docname)))))))
823 define DEF_CRATE_DOC_TEST
825 # If NO_REBUILD is set then break the dependencies on everything but
826 # the source files so we can test crate documentation without
827 # rebuilding any of the parent crates.
828 ifeq ($(NO_REBUILD),)
829 CRATEDOCTESTDEP_$(1)_$(2)_$(3)_$(4) = \
830 $$(TEST_SREQ$(1)_T_$(2)_H_$(3)) \
831 $$(CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4)) \
832 $$(RUSTDOC_EXE_$(1)_T_$(2)_H_$(3))
834 CRATEDOCTESTDEP_$(1)_$(2)_$(3)_$(4) = $$(RSINPUTS_$(4))
837 check-stage$(1)-T-$(2)-H-$(3)-doc-crate-$(4)-exec: \
838 $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4))
840 ifeq ($(2),$$(CFG_BUILD))
841 $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4)): $$(CRATEDOCTESTDEP_$(1)_$(2)_$(3)_$(4))
842 @$$(call E, run doc-crate-$(4) [$(2)])
843 $$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(3)) \
844 $$(RUSTDOC_$(1)_T_$(2)_H_$(3)) --test --cfg dox \
845 $$(CRATEFILE_$(4)) --test-args "$$(TESTARGS)" && touch $$@
847 $$(call TEST_OK_FILE,$(1),$(2),$(3),doc-crate-$(4)):
853 $(foreach host,$(CFG_HOST), \
854 $(foreach target,$(CFG_TARGET), \
855 $(foreach stage,$(STAGES), \
856 $(foreach crate,$(TEST_DOC_CRATES), \
857 $(eval $(call DEF_CRATE_DOC_TEST,$(stage),$(target),$(host),$(crate)))))))
859 ######################################################################
861 ######################################################################
865 $(foreach crate,$(TEST_CRATES),$(crate)) \
866 $(foreach crate,$(TEST_DOC_CRATES),doc-crate-$(crate)) \
880 $(foreach docname,$(DOCS),doc-$(docname)) \
883 pretty-rpass-valgrind \
890 define DEF_CHECK_FOR_STAGE_AND_TARGET_AND_HOST
891 check-stage$(1)-T-$(2)-H-$(3): check-stage$(1)-T-$(2)-H-$(3)-exec
894 $(foreach stage,$(STAGES), \
895 $(foreach target,$(CFG_TARGET), \
896 $(foreach host,$(CFG_HOST), \
897 $(eval $(call DEF_CHECK_FOR_STAGE_AND_TARGET_AND_HOST,$(stage),$(target),$(host))))))
899 define DEF_CHECK_FOR_STAGE_AND_TARGET_AND_HOST_AND_GROUP
900 check-stage$(1)-T-$(2)-H-$(3)-$(4): check-stage$(1)-T-$(2)-H-$(3)-$(4)-exec
903 $(foreach stage,$(STAGES), \
904 $(foreach target,$(CFG_TARGET), \
905 $(foreach host,$(CFG_HOST), \
906 $(foreach group,$(TEST_GROUPS), \
907 $(eval $(call DEF_CHECK_FOR_STAGE_AND_TARGET_AND_HOST_AND_GROUP,$(stage),$(target),$(host),$(group)))))))
909 define DEF_CHECK_FOR_STAGE
910 check-stage$(1): check-stage$(1)-H-$$(CFG_BUILD)
911 check-stage$(1)-H-all: $$(foreach target,$$(CFG_TARGET), \
912 check-stage$(1)-H-$$(target))
915 $(foreach stage,$(STAGES), \
916 $(eval $(call DEF_CHECK_FOR_STAGE,$(stage))))
918 define DEF_CHECK_FOR_STAGE_AND_GROUP
919 check-stage$(1)-$(2): check-stage$(1)-H-$$(CFG_BUILD)-$(2)
920 check-stage$(1)-H-all-$(2): $$(foreach target,$$(CFG_TARGET), \
921 check-stage$(1)-H-$$(target)-$(2))
924 $(foreach stage,$(STAGES), \
925 $(foreach group,$(TEST_GROUPS), \
926 $(eval $(call DEF_CHECK_FOR_STAGE_AND_GROUP,$(stage),$(group)))))
929 define DEF_CHECK_FOR_STAGE_AND_HOSTS
930 check-stage$(1)-H-$(2): $$(foreach target,$$(CFG_TARGET), \
931 check-stage$(1)-T-$$(target)-H-$(2))
934 $(foreach stage,$(STAGES), \
935 $(foreach host,$(CFG_HOST), \
936 $(eval $(call DEF_CHECK_FOR_STAGE_AND_HOSTS,$(stage),$(host)))))
938 define DEF_CHECK_FOR_STAGE_AND_HOSTS_AND_GROUP
939 check-stage$(1)-H-$(2)-$(3): $$(foreach target,$$(CFG_TARGET), \
940 check-stage$(1)-T-$$(target)-H-$(2)-$(3))
943 $(foreach stage,$(STAGES), \
944 $(foreach host,$(CFG_HOST), \
945 $(foreach group,$(TEST_GROUPS), \
946 $(eval $(call DEF_CHECK_FOR_STAGE_AND_HOSTS_AND_GROUP,$(stage),$(host),$(group))))))
948 define DEF_CHECK_DOC_FOR_STAGE
949 check-stage$(1)-docs: $$(foreach docname,$$(DOCS), \
950 check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-$$(docname)) \
951 $$(foreach crate,$$(TEST_DOC_CRATES), \
952 check-stage$(1)-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-doc-crate-$$(crate))
955 $(foreach stage,$(STAGES), \
956 $(eval $(call DEF_CHECK_DOC_FOR_STAGE,$(stage))))
958 define DEF_CHECK_CRATE
959 check-$(1): check-stage2-T-$$(CFG_BUILD)-H-$$(CFG_BUILD)-$(1)-exec
962 $(foreach crate,$(TEST_CRATES), \
963 $(eval $(call DEF_CHECK_CRATE,$(crate))))
965 ######################################################################
967 ######################################################################
969 RMAKE_TESTS := $(shell ls -d $(S)src/test/run-make/*/)
970 RMAKE_TESTS := $(RMAKE_TESTS:$(S)src/test/run-make/%/=%)
972 define DEF_RMAKE_FOR_T_H
978 ifeq ($(2)$(3),$$(CFG_BUILD)$$(CFG_BUILD))
979 check-stage$(1)-T-$(2)-H-$(3)-rmake-exec: \
980 $$(call TEST_OK_FILE,$(1),$(2),$(3),rmake)
982 $$(call TEST_OK_FILE,$(1),$(2),$(3),rmake): \
983 $$(RMAKE_TESTS:%=$(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok)
986 $(3)/test/run-make/%-$(1)-T-$(2)-H-$(3).ok: \
987 $(S)src/test/run-make/%/Makefile \
988 $$(CSREQ$(1)_T_$(2)_H_$(3))
989 @rm -rf $(3)/test/run-make/$$*
990 @mkdir -p $(3)/test/run-make/$$*
991 $$(Q)$$(CFG_PYTHON) $(S)src/etc/maketest.py $$(dir $$<) \
993 $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
994 $(3)/test/run-make/$$* \
995 "$$(CC_$(3)) $$(CFG_GCCISH_CFLAGS_$(3))" \
996 $$(HBIN$(1)_H_$(3))/rustdoc$$(X_$(3)) \
998 $$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3)) \
999 "$$(LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3))" \
1000 "$$(LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3))" \
1004 # FIXME #11094 - The above rule doesn't work right for multiple targets
1005 check-stage$(1)-T-$(2)-H-$(3)-rmake-exec:
1013 $(foreach stage,$(STAGES), \
1014 $(foreach target,$(CFG_TARGET), \
1015 $(foreach host,$(CFG_HOST), \
1016 $(eval $(call DEF_RMAKE_FOR_T_H,$(stage),$(target),$(host))))))