File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ # The ` run-make ` test suite
2+
3+ The ` run-make ` test suite contains tests which are the most flexible out of all
4+ the [ rust-lang/rust] ( https://github.com/rust-lang/rust ) test suites. ` run-make `
5+ tests can basically contain arbitrary code, and are supported by the
6+ [ ` run_make_support ` ] library.
7+
8+ ## Infrastructure
9+
10+ The implementation for collecting and building the ` rmake.rs ` recipes (or
11+ ` Makefile ` s) are in
12+ [ ` src/tools/compiletest/src/runtest.rs ` ] ( https://github.com/rust-lang/rust/blob/master/src/tools/compiletest/src/runtest.rs ) ,
13+ in ` run_rmake_v2_test ` and ` run_rmake_legacy_test ` .
14+
15+ ### Rust-based ` run-make ` tests: ` rmake.rs `
16+
17+ The setup for the ` rmake.rs ` version is a 3-stage process:
18+
19+ 1 . First, we build the [ ` run_make_support ` ] library in bootstrap as a tool lib.
20+ 2 . Then, we compile the ` rmake.rs ` "recipe" linking the support library and its
21+ dependencies in, and provide a bunch of env vars. We setup a directory
22+ structure within ` build/<target>/test/run-make/ `
23+
24+ ```
25+ <test-name>/
26+ rmake.exe # recipe binary
27+ rmake_out/ # sources from test sources copied over
28+ ```
29+
30+ and copy non-` rmake.rs ` input support files over to ` rmake_out/ ` . The
31+ support library is made available as an [ * extern prelude* ] [ extern_prelude ] .
32+ 3 . Finally, we run the recipe binary and set ` rmake_out/ ` as the CWD.
33+
34+ [ `run_make_support` ] : https://github.com/rust-lang/rust/tree/master/src/tools/run-make-support
35+ [ extern_prelude ] : https://doc.rust-lang.org/reference/names/preludes.html#extern-prelude
You can’t perform that action at this time.
0 commit comments