blob: 3e0cfa33a2bc50a3e7b9ab530c061196bffef651 [file] [log] [blame]
Alex Crichtondefd1b32016-03-08 07:15:551// Copyright 2016 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.
4//
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.
10
Alex Crichton0e272de2016-11-16 20:31:1911//! Implementation of the test-related targets of the build system.
Alex Crichtonf72bfe62016-05-02 22:16:1512//!
13//! This file implements the various regression test suites that we execute on
14//! our CI.
15
Alex Crichtona270b802016-10-21 20:18:0916use std::collections::HashSet;
Alex Crichtonbb9062a2016-04-29 21:23:1517use std::env;
Nick Cameron04415dc2017-06-30 18:58:5418use std::ffi::OsString;
Mark Simulacrum5b44cbc2017-06-26 16:23:5019use std::iter;
Ulrik Sverdrupb1566ba2016-11-25 21:13:5920use std::fmt;
Mark Simulacrumdd1d75e2017-06-04 23:55:5021use std::fs::{self, File};
Alex Crichtonede89442016-04-15 01:00:3522use std::path::{PathBuf, Path};
23use std::process::Command;
Mark Simulacrumdd1d75e2017-06-04 23:55:5024use std::io::Read;
Alex Crichton73c2d2a2016-04-14 21:27:5125
Mark Simulacrum5b44cbc2017-06-26 16:23:5026use build_helper::{self, output};
Alex Crichton126e09e2016-04-14 22:51:0327
Mark Simulacrum001e9f32017-07-05 01:41:4328use {Build, Mode};
Alex Crichtond38db822016-12-09 01:13:5529use dist;
Mark Simulacrum001e9f32017-07-05 01:41:4330use util::{self, dylib_path, dylib_path_var};
31
32use compile;
33use native;
Mark Simulacrum6a67a052017-07-20 23:51:0734use builder::{Kind, RunConfig, ShouldRun, Builder, Compiler, Step};
Mark Simulacrumceecd622017-07-12 16:12:4735use tool::{self, Tool};
Mark Simulacrum528646e2017-07-14 00:48:4436use cache::{INTERNER, Interned};
Alex Crichton39a5d3f2016-06-28 20:31:3037
Mark Simulacrum5b44cbc2017-06-26 16:23:5038const ADB_TEST_DIR: &str = "/data/tmp/work";
Alex Crichtondefd1b32016-03-08 07:15:5539
Ulrik Sverdrupb1566ba2016-11-25 21:13:5940/// The two modes of the test runner; tests or benchmarks.
Mark Simulacrum528646e2017-07-14 00:48:4441#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone)]
Ulrik Sverdrupb1566ba2016-11-25 21:13:5942pub enum TestKind {
43 /// Run `cargo test`
44 Test,
45 /// Run `cargo bench`
46 Bench,
47}
48
49impl TestKind {
50 // Return the cargo subcommand for this test kind
51 fn subcommand(self) -> &'static str {
52 match self {
53 TestKind::Test => "test",
54 TestKind::Bench => "bench",
55 }
56 }
57}
58
59impl fmt::Display for TestKind {
60 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
61 f.write_str(match *self {
62 TestKind::Test => "Testing",
63 TestKind::Bench => "Benchmarking",
64 })
65 }
66}
67
Josh Stone617aea42017-06-02 16:27:4468fn try_run(build: &Build, cmd: &mut Command) {
Mark Simulacrum4dc8fe92017-06-27 19:37:2469 if !build.fail_fast {
Josh Stone617aea42017-06-02 16:27:4470 if !build.try_run(cmd) {
71 let failures = build.delayed_failures.get();
72 build.delayed_failures.set(failures + 1);
73 }
74 } else {
75 build.run(cmd);
76 }
77}
78
79fn try_run_quiet(build: &Build, cmd: &mut Command) {
Mark Simulacrum4dc8fe92017-06-27 19:37:2480 if !build.fail_fast {
Josh Stone617aea42017-06-02 16:27:4481 if !build.try_run_quiet(cmd) {
82 let failures = build.delayed_failures.get();
83 build.delayed_failures.set(failures + 1);
84 }
85 } else {
86 build.run_quiet(cmd);
87 }
88}
89
Mark Simulacrum528646e2017-07-14 00:48:4490#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
91pub struct Linkcheck {
92 host: Interned<String>,
Mark Simulacrum001e9f32017-07-05 01:41:4393}
94
Mark Simulacrum528646e2017-07-14 00:48:4495impl Step for Linkcheck {
Mark Simulacrum001e9f32017-07-05 01:41:4396 type Output = ();
Mark Simulacrum6b3413d2017-07-05 12:41:2797 const ONLY_HOSTS: bool = true;
98 const DEFAULT: bool = true;
Mark Simulacrum001e9f32017-07-05 01:41:4399
100 /// Runs the `linkchecker` tool as compiled in `stage` by the `host` compiler.
101 ///
102 /// This tool in `src/tools` will verify the validity of all our links in the
103 /// documentation to ensure we don't have a bunch of dead ones.
104 fn run(self, builder: &Builder) {
105 let build = builder.build;
106 let host = self.host;
107
108 println!("Linkcheck ({})", host);
Mark Simulacrum6b3413d2017-07-05 12:41:27109
110 builder.default_doc(None);
Mark Simulacrum001e9f32017-07-05 01:41:43111
112 let _time = util::timeit();
Mark Simulacrum6b3413d2017-07-05 12:41:27113 try_run(build, builder.tool_cmd(Tool::Linkchecker)
Mark Simulacrum001e9f32017-07-05 01:41:43114 .arg(build.out.join(host).join("doc")));
115 }
Mark Simulacrum6b3413d2017-07-05 12:41:27116
Mark Simulacrum56128fb2017-07-19 00:03:38117 fn should_run(run: ShouldRun) -> ShouldRun {
Mark Simulacrumb05af492017-07-20 23:24:11118 let builder = run.builder;
119 run.path("src/tools/linkchecker").default_condition(builder.build.config.docs)
Mark Simulacrum6b3413d2017-07-05 12:41:27120 }
121
Mark Simulacrum6a67a052017-07-20 23:51:07122 fn make_run(run: RunConfig) {
123 run.builder.ensure(Linkcheck { host: run.host });
Mark Simulacrum6b3413d2017-07-05 12:41:27124 }
Alex Crichtondefd1b32016-03-08 07:15:55125}
Brian Anderson3a790ac2016-03-18 20:54:31126
Mark Simulacrum528646e2017-07-14 00:48:44127#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
128pub struct Cargotest {
Mark Simulacrum001e9f32017-07-05 01:41:43129 stage: u32,
Mark Simulacrum528646e2017-07-14 00:48:44130 host: Interned<String>,
Mark Simulacrum001e9f32017-07-05 01:41:43131}
Alex Crichton73c2d2a2016-04-14 21:27:51132
Mark Simulacrum528646e2017-07-14 00:48:44133impl Step for Cargotest {
Mark Simulacrum001e9f32017-07-05 01:41:43134 type Output = ();
Mark Simulacrum6b3413d2017-07-05 12:41:27135 const ONLY_HOSTS: bool = true;
Mark Simulacrum001e9f32017-07-05 01:41:43136
Mark Simulacrum56128fb2017-07-19 00:03:38137 fn should_run(run: ShouldRun) -> ShouldRun {
138 run.path("src/tools/cargotest")
Mark Simulacrumceecd622017-07-12 16:12:47139 }
140
Mark Simulacrum6a67a052017-07-20 23:51:07141 fn make_run(run: RunConfig) {
142 run.builder.ensure(Cargotest {
143 stage: run.builder.top_stage,
144 host: run.host,
Mark Simulacrumceecd622017-07-12 16:12:47145 });
146 }
147
Mark Simulacrum001e9f32017-07-05 01:41:43148 /// Runs the `cargotest` tool as compiled in `stage` by the `host` compiler.
149 ///
150 /// This tool in `src/tools` will check out a few Rust projects and run `cargo
151 /// test` to ensure that we don't regress the test suites there.
152 fn run(self, builder: &Builder) {
153 let build = builder.build;
Mark Simulacrum60388302017-07-05 16:46:41154 let compiler = builder.compiler(self.stage, self.host);
Mark Simulacrum6b3413d2017-07-05 12:41:27155 builder.ensure(compile::Rustc { compiler, target: compiler.host });
Mark Simulacrum001e9f32017-07-05 01:41:43156
157 // Note that this is a short, cryptic, and not scoped directory name. This
158 // is currently to minimize the length of path on Windows where we otherwise
159 // quickly run into path name limit constraints.
160 let out_dir = build.out.join("ct");
161 t!(fs::create_dir_all(&out_dir));
162
163 let _time = util::timeit();
Mark Simulacrum6b3413d2017-07-05 12:41:27164 let mut cmd = builder.tool_cmd(Tool::CargoTest);
Mark Simulacrum001e9f32017-07-05 01:41:43165 try_run(build, cmd.arg(&build.initial_cargo)
166 .arg(&out_dir)
Mark Simulacrumc114fe52017-07-05 17:21:33167 .env("RUSTC", builder.rustc(compiler))
168 .env("RUSTDOC", builder.rustdoc(compiler)));
Mark Simulacrum001e9f32017-07-05 01:41:43169 }
Alex Crichton009f45f2017-04-18 00:24:05170}
171
Mark Simulacrum528646e2017-07-14 00:48:44172#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
173pub struct Cargo {
Mark Simulacrum001e9f32017-07-05 01:41:43174 stage: u32,
Mark Simulacrum528646e2017-07-14 00:48:44175 host: Interned<String>,
Nick Cameron04415dc2017-06-30 18:58:54176}
177
Mark Simulacrum528646e2017-07-14 00:48:44178impl Step for Cargo {
Mark Simulacrum001e9f32017-07-05 01:41:43179 type Output = ();
Mark Simulacrum6b3413d2017-07-05 12:41:27180 const ONLY_HOSTS: bool = true;
181
Mark Simulacrum56128fb2017-07-19 00:03:38182 fn should_run(run: ShouldRun) -> ShouldRun {
183 run.path("src/tools/cargo")
Mark Simulacrum6b3413d2017-07-05 12:41:27184 }
185
Mark Simulacrum6a67a052017-07-20 23:51:07186 fn make_run(run: RunConfig) {
187 run.builder.ensure(Cargo {
188 stage: run.builder.top_stage,
189 host: run.target,
Mark Simulacrum6b3413d2017-07-05 12:41:27190 });
191 }
Nick Cameron04415dc2017-06-30 18:58:54192
Mark Simulacrum001e9f32017-07-05 01:41:43193 /// Runs `cargo test` for `cargo` packaged with Rust.
194 fn run(self, builder: &Builder) {
195 let build = builder.build;
Mark Simulacrum6b3413d2017-07-05 12:41:27196 let compiler = builder.compiler(self.stage, self.host);
Nick Cameron04415dc2017-06-30 18:58:54197
Mark Simulacrum4a21c722017-07-20 12:27:13198 builder.ensure(tool::Cargo { stage: self.stage, target: self.host });
Mark Simulacrumc114fe52017-07-05 17:21:33199 let mut cargo = builder.cargo(compiler, Mode::Tool, self.host, "test");
Mark Simulacrum001e9f32017-07-05 01:41:43200 cargo.arg("--manifest-path").arg(build.src.join("src/tools/cargo/Cargo.toml"));
201 if !build.fail_fast {
202 cargo.arg("--no-fail-fast");
203 }
Nick Cameron04415dc2017-06-30 18:58:54204
Mark Simulacrum001e9f32017-07-05 01:41:43205 // Don't build tests dynamically, just a pain to work with
206 cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
207
208 // Don't run cross-compile tests, we may not have cross-compiled libstd libs
209 // available.
210 cargo.env("CFG_DISABLE_CROSS_TESTS", "1");
211
Mark Simulacrumdec44b02017-07-17 15:52:05212 try_run(build, cargo.env("PATH", &path_for_cargo(builder, compiler)));
Mark Simulacrum001e9f32017-07-05 01:41:43213 }
214}
215
Mark Simulacrumdec44b02017-07-17 15:52:05216#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
217pub struct Rls {
Mark Simulacrum001e9f32017-07-05 01:41:43218 stage: u32,
Mark Simulacrumdec44b02017-07-17 15:52:05219 host: Interned<String>,
Mark Simulacrum001e9f32017-07-05 01:41:43220}
221
Mark Simulacrumdec44b02017-07-17 15:52:05222impl Step for Rls {
Mark Simulacrum001e9f32017-07-05 01:41:43223 type Output = ();
Mark Simulacrumdec44b02017-07-17 15:52:05224 const ONLY_HOSTS: bool = true;
225
Mark Simulacrum56128fb2017-07-19 00:03:38226 fn should_run(run: ShouldRun) -> ShouldRun {
227 run.path("src/tools/rls")
Mark Simulacrumdec44b02017-07-17 15:52:05228 }
229
Mark Simulacrum6a67a052017-07-20 23:51:07230 fn make_run(run: RunConfig) {
231 run.builder.ensure(Rls {
232 stage: run.builder.top_stage,
233 host: run.target,
Mark Simulacrumdec44b02017-07-17 15:52:05234 });
235 }
Mark Simulacrum001e9f32017-07-05 01:41:43236
237 /// Runs `cargo test` for the rls.
238 fn run(self, builder: &Builder) {
239 let build = builder.build;
240 let stage = self.stage;
241 let host = self.host;
Mark Simulacrumdec44b02017-07-17 15:52:05242 let compiler = builder.compiler(stage, host);
Mark Simulacrum001e9f32017-07-05 01:41:43243
Mark Simulacrum4a21c722017-07-20 12:27:13244 builder.ensure(tool::Rls { stage: self.stage, target: self.host });
Mark Simulacrumdec44b02017-07-17 15:52:05245 let mut cargo = builder.cargo(compiler, Mode::Tool, host, "test");
Mark Simulacrum001e9f32017-07-05 01:41:43246 cargo.arg("--manifest-path").arg(build.src.join("src/tools/rls/Cargo.toml"));
247
248 // Don't build tests dynamically, just a pain to work with
249 cargo.env("RUSTC_NO_PREFER_DYNAMIC", "1");
250
Mark Simulacrumdec44b02017-07-17 15:52:05251 builder.add_rustc_lib_path(compiler, &mut cargo);
Mark Simulacrum001e9f32017-07-05 01:41:43252
253 try_run(build, &mut cargo);
254 }
Nick Cameron04415dc2017-06-30 18:58:54255}
256
Mark Simulacrumdec44b02017-07-17 15:52:05257fn path_for_cargo(builder: &Builder, compiler: Compiler) -> OsString {
Nick Cameron04415dc2017-06-30 18:58:54258 // Configure PATH to find the right rustc. NB. we have to use PATH
259 // and not RUSTC because the Cargo test suite has tests that will
260 // fail if rustc is not spelled `rustc`.
Mark Simulacrumdec44b02017-07-17 15:52:05261 let path = builder.sysroot(compiler).join("bin");
Nick Cameron04415dc2017-06-30 18:58:54262 let old_path = env::var_os("PATH").unwrap_or_default();
263 env::join_paths(iter::once(path).chain(env::split_paths(&old_path))).expect("")
Brian Anderson3a790ac2016-03-18 20:54:31264}
Alex Crichton9dd3c542016-03-29 20:14:52265
Mark Simulacrum528646e2017-07-14 00:48:44266#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
267pub struct Tidy {
268 host: Interned<String>,
Mark Simulacrum001e9f32017-07-05 01:41:43269}
270
Mark Simulacrum528646e2017-07-14 00:48:44271impl Step for Tidy {
Mark Simulacrum001e9f32017-07-05 01:41:43272 type Output = ();
Mark Simulacrum6b3413d2017-07-05 12:41:27273 const DEFAULT: bool = true;
274 const ONLY_HOSTS: bool = true;
275 const ONLY_BUILD: bool = true;
Mark Simulacrum001e9f32017-07-05 01:41:43276
277 /// Runs the `tidy` tool as compiled in `stage` by the `host` compiler.
278 ///
279 /// This tool in `src/tools` checks up on various bits and pieces of style and
280 /// otherwise just implements a few lint-like checks that are specific to the
281 /// compiler itself.
282 fn run(self, builder: &Builder) {
283 let build = builder.build;
284 let host = self.host;
285
286 let _folder = build.fold_output(|| "tidy");
287 println!("tidy check ({})", host);
Mark Simulacrum60388302017-07-05 16:46:41288 let mut cmd = builder.tool_cmd(Tool::Tidy);
Mark Simulacrum001e9f32017-07-05 01:41:43289 cmd.arg(build.src.join("src"));
290 if !build.config.vendor {
291 cmd.arg("--no-vendor");
292 }
293 if build.config.quiet_tests {
294 cmd.arg("--quiet");
295 }
296 try_run(build, &mut cmd);
Eduard-Mihai Burtescud29f0bc2017-02-10 20:59:40297 }
Mark Simulacrum6b3413d2017-07-05 12:41:27298
Mark Simulacrum56128fb2017-07-19 00:03:38299 fn should_run(run: ShouldRun) -> ShouldRun {
300 run.path("src/tools/tidy")
Mark Simulacrum6b3413d2017-07-05 12:41:27301 }
302
Mark Simulacrum6a67a052017-07-20 23:51:07303 fn make_run(run: RunConfig) {
304 run.builder.ensure(Tidy {
305 host: run.builder.build.build,
Mark Simulacrum6b3413d2017-07-05 12:41:27306 });
307 }
Alex Crichton9dd3c542016-03-29 20:14:52308}
Alex Crichtonb325baf2016-04-05 18:34:23309
Mark Simulacrum528646e2017-07-14 00:48:44310fn testdir(build: &Build, host: Interned<String>) -> PathBuf {
Alex Crichtonb325baf2016-04-05 18:34:23311 build.out.join(host).join("test")
312}
313
Mark Simulacrum528646e2017-07-14 00:48:44314#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
Mark Simulacrum1ab89302017-07-07 17:51:57315struct Test {
Mark Simulacrum1ab89302017-07-07 17:51:57316 path: &'static str,
317 mode: &'static str,
318 suite: &'static str,
319}
320
Mark Simulacrumaa8b93b2017-07-07 18:31:29321static DEFAULT_COMPILETESTS: &[Test] = &[
322 Test { path: "src/test/ui", mode: "ui", suite: "ui" },
323 Test { path: "src/test/run-pass", mode: "run-pass", suite: "run-pass" },
324 Test { path: "src/test/compile-fail", mode: "compile-fail", suite: "compile-fail" },
325 Test { path: "src/test/parse-fail", mode: "parse-fail", suite: "parse-fail" },
326 Test { path: "src/test/run-fail", mode: "run-fail", suite: "run-fail" },
Mark Simulacrum1ab89302017-07-07 17:51:57327 Test {
Mark Simulacrum1ab89302017-07-07 17:51:57328 path: "src/test/run-pass-valgrind",
329 mode: "run-pass-valgrind",
330 suite: "run-pass-valgrind"
331 },
Mark Simulacrumaa8b93b2017-07-07 18:31:29332 Test { path: "src/test/mir-opt", mode: "mir-opt", suite: "mir-opt" },
333 Test { path: "src/test/codegen", mode: "codegen", suite: "codegen" },
334 Test { path: "src/test/codegen-units", mode: "codegen-units", suite: "codegen-units" },
335 Test { path: "src/test/incremental", mode: "incremental", suite: "incremental" },
Mark Simulacrum6b3413d2017-07-05 12:41:27336
Mark Simulacrumaa8b93b2017-07-07 18:31:29337 // What this runs varies depending on the native platform being apple
338 Test { path: "src/test/debuginfo", mode: "debuginfo-XXX", suite: "debuginfo" },
Mark Simulacrumaa8b93b2017-07-07 18:31:29339];
Mark Simulacrum6b3413d2017-07-05 12:41:27340
Mark Simulacrumf1d04a32017-07-20 15:42:18341#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
342pub struct DefaultCompiletest {
343 compiler: Compiler,
344 target: Interned<String>,
345 mode: &'static str,
346 suite: &'static str,
347}
348
349impl Step for DefaultCompiletest {
350 type Output = ();
351 const DEFAULT: bool = true;
352
353 fn should_run(mut run: ShouldRun) -> ShouldRun {
354 for test in DEFAULT_COMPILETESTS {
355 run = run.path(test.path);
356 }
357 run
358 }
359
Mark Simulacrum6a67a052017-07-20 23:51:07360 fn make_run(run: RunConfig) {
361 let compiler = run.builder.compiler(run.builder.top_stage, run.host);
Mark Simulacrumf1d04a32017-07-20 15:42:18362
Mark Simulacrum6a67a052017-07-20 23:51:07363 let test = run.path.map(|path| {
Mark Simulacrumf1d04a32017-07-20 15:42:18364 DEFAULT_COMPILETESTS.iter().find(|&&test| {
365 path.ends_with(test.path)
366 }).unwrap_or_else(|| {
367 panic!("make_run in compile test to receive test path, received {:?}", path);
368 })
369 });
370
371 if let Some(test) = test {
Mark Simulacrum6a67a052017-07-20 23:51:07372 run.builder.ensure(DefaultCompiletest {
Mark Simulacrumf1d04a32017-07-20 15:42:18373 compiler,
Mark Simulacrum6a67a052017-07-20 23:51:07374 target: run.target,
Mark Simulacrumf1d04a32017-07-20 15:42:18375 mode: test.mode,
376 suite: test.suite,
377 });
378 } else {
379 for test in DEFAULT_COMPILETESTS {
Mark Simulacrum6a67a052017-07-20 23:51:07380 run.builder.ensure(DefaultCompiletest {
Mark Simulacrumf1d04a32017-07-20 15:42:18381 compiler,
Mark Simulacrum6a67a052017-07-20 23:51:07382 target: run.target,
Mark Simulacrumf1d04a32017-07-20 15:42:18383 mode: test.mode,
384 suite: test.suite
385 });
386 }
387 }
388 }
389
390 fn run(self, builder: &Builder) {
391 builder.ensure(Compiletest {
392 compiler: self.compiler,
393 target: self.target,
394 mode: self.mode,
395 suite: self.suite,
396 })
397 }
398}
399
Mark Simulacrumaa8b93b2017-07-07 18:31:29400// Also default, but host-only.
401static HOST_COMPILETESTS: &[Test] = &[
402 Test { path: "src/test/ui-fulldeps", mode: "ui", suite: "ui-fulldeps" },
403 Test { path: "src/test/run-pass-fulldeps", mode: "run-pass", suite: "run-pass-fulldeps" },
404 Test { path: "src/test/run-fail-fulldeps", mode: "run-fail", suite: "run-fail-fulldeps" },
Mark Simulacrum1ab89302017-07-07 17:51:57405 Test {
Mark Simulacrum1ab89302017-07-07 17:51:57406 path: "src/test/compile-fail-fulldeps",
407 mode: "compile-fail",
408 suite: "compile-fail-fulldeps",
409 },
Mark Simulacrumaa8b93b2017-07-07 18:31:29410 Test { path: "src/test/run-make", mode: "run-make", suite: "run-make" },
411 Test { path: "src/test/rustdoc", mode: "rustdoc", suite: "rustdoc" },
Mark Simulacrum6b3413d2017-07-05 12:41:27412
Mark Simulacrumaa8b93b2017-07-07 18:31:29413 Test { path: "src/test/pretty", mode: "pretty", suite: "pretty" },
414 Test { path: "src/test/run-pass/pretty", mode: "pretty", suite: "run-pass" },
415 Test { path: "src/test/run-fail/pretty", mode: "pretty", suite: "run-fail" },
416 Test { path: "src/test/run-pass-valgrind/pretty", mode: "pretty", suite: "run-pass-valgrind" },
417 Test { path: "src/test/run-pass-fulldeps/pretty", mode: "pretty", suite: "run-pass-fulldeps" },
418 Test { path: "src/test/run-fail-fulldeps/pretty", mode: "pretty", suite: "run-fail-fulldeps" },
Mark Simulacrum6b3413d2017-07-05 12:41:27419];
420
Mark Simulacrumf1d04a32017-07-20 15:42:18421#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
422pub struct HostCompiletest {
423 compiler: Compiler,
424 target: Interned<String>,
425 mode: &'static str,
426 suite: &'static str,
427}
Mark Simulacrum6b3413d2017-07-05 12:41:27428
Mark Simulacrumf1d04a32017-07-20 15:42:18429impl Step for HostCompiletest {
Mark Simulacrum001e9f32017-07-05 01:41:43430 type Output = ();
Mark Simulacrum6b3413d2017-07-05 12:41:27431 const DEFAULT: bool = true;
Mark Simulacrumf1d04a32017-07-20 15:42:18432 const ONLY_HOSTS: bool = true;
Mark Simulacrum6b3413d2017-07-05 12:41:27433
Mark Simulacrum56128fb2017-07-19 00:03:38434 fn should_run(mut run: ShouldRun) -> ShouldRun {
Mark Simulacrumf1d04a32017-07-20 15:42:18435 for test in HOST_COMPILETESTS {
Mark Simulacrum56128fb2017-07-19 00:03:38436 run = run.path(test.path);
437 }
438 run
Mark Simulacrum6b3413d2017-07-05 12:41:27439 }
440
Mark Simulacrum6a67a052017-07-20 23:51:07441 fn make_run(run: RunConfig) {
442 let compiler = run.builder.compiler(run.builder.top_stage, run.host);
Mark Simulacrum6b3413d2017-07-05 12:41:27443
Mark Simulacrum6a67a052017-07-20 23:51:07444 let test = run.path.map(|path| {
Mark Simulacrumf1d04a32017-07-20 15:42:18445 HOST_COMPILETESTS.iter().find(|&&test| {
Mark Simulacrum1ab89302017-07-07 17:51:57446 path.ends_with(test.path)
Mark Simulacrum6b3413d2017-07-05 12:41:27447 }).unwrap_or_else(|| {
448 panic!("make_run in compile test to receive test path, received {:?}", path);
449 })
450 });
451
Mark Simulacrumf1d04a32017-07-20 15:42:18452 if let Some(test) = test {
Mark Simulacrum6a67a052017-07-20 23:51:07453 run.builder.ensure(HostCompiletest {
Mark Simulacrumf1d04a32017-07-20 15:42:18454 compiler,
Mark Simulacrum6a67a052017-07-20 23:51:07455 target: run.target,
Mark Simulacrumf1d04a32017-07-20 15:42:18456 mode: test.mode,
457 suite: test.suite,
Mark Simulacrum6b3413d2017-07-05 12:41:27458 });
Mark Simulacrumf1d04a32017-07-20 15:42:18459 } else {
460 for test in HOST_COMPILETESTS {
Mark Simulacruma88a09c2017-07-23 13:22:12461 if test.mode == "pretty" {
462 continue;
463 }
Mark Simulacrum6a67a052017-07-20 23:51:07464 run.builder.ensure(HostCompiletest {
Mark Simulacrumaa8b93b2017-07-07 18:31:29465 compiler,
Mark Simulacrum6a67a052017-07-20 23:51:07466 target: run.target,
Mark Simulacrumaa8b93b2017-07-07 18:31:29467 mode: test.mode,
468 suite: test.suite
469 });
470 }
Mark Simulacrum6b3413d2017-07-05 12:41:27471 }
472 }
Alex Crichtonf72bfe62016-05-02 22:16:15473
Mark Simulacrumf1d04a32017-07-20 15:42:18474 fn run(self, builder: &Builder) {
475 builder.ensure(Compiletest {
476 compiler: self.compiler,
477 target: self.target,
478 mode: self.mode,
479 suite: self.suite,
480 })
481 }
482}
483
484#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
485struct Compiletest {
486 compiler: Compiler,
487 target: Interned<String>,
488 mode: &'static str,
489 suite: &'static str,
490}
491
492impl Step for Compiletest {
493 type Output = ();
494
495 fn should_run(run: ShouldRun) -> ShouldRun {
496 run.never()
497 }
498
Mark Simulacrum001e9f32017-07-05 01:41:43499 /// Executes the `compiletest` tool to run a suite of tests.
500 ///
501 /// Compiles all tests with `compiler` for `target` with the specified
502 /// compiletest `mode` and `suite` arguments. For example `mode` can be
503 /// "run-pass" or `suite` can be something like `debuginfo`.
504 fn run(self, builder: &Builder) {
505 let build = builder.build;
506 let compiler = self.compiler;
507 let target = self.target;
508 let mode = self.mode;
509 let suite = self.suite;
Mark Simulacrum6b3413d2017-07-05 12:41:27510
511 // Skip codegen tests if they aren't enabled in configuration.
512 if !build.config.codegen_tests && suite == "codegen" {
513 return;
514 }
515
516 if suite == "debuginfo" {
Mark Simulacrum951616c2017-07-20 17:23:29517 // Skip debuginfo tests on MSVC
518 if build.build.contains("msvc") {
519 return;
520 }
521
Mark Simulacrum6b3413d2017-07-05 12:41:27522 if mode == "debuginfo-XXX" {
523 return if build.build.contains("apple") {
524 builder.ensure(Compiletest {
525 mode: "debuginfo-lldb",
526 ..self
Mark Simulacrum528646e2017-07-14 00:48:44527 });
Mark Simulacrum6b3413d2017-07-05 12:41:27528 } else {
529 builder.ensure(Compiletest {
530 mode: "debuginfo-gdb",
531 ..self
Mark Simulacrum528646e2017-07-14 00:48:44532 });
Mark Simulacrum6b3413d2017-07-05 12:41:27533 };
534 }
535
Mark Simulacrum6b3413d2017-07-05 12:41:27536 builder.ensure(dist::DebuggerScripts {
Mark Simulacrum528646e2017-07-14 00:48:44537 sysroot: builder.sysroot(compiler),
Mark Simulacrum5984e702017-07-13 00:52:31538 target: target
Mark Simulacrum6b3413d2017-07-05 12:41:27539 });
540 }
541
542 if suite.ends_with("fulldeps") ||
543 // FIXME: Does pretty need librustc compiled? Note that there are
544 // fulldeps test suites with mode = pretty as well.
545 mode == "pretty" ||
546 mode == "rustdoc" ||
547 mode == "run-make" {
548 builder.ensure(compile::Rustc { compiler, target });
549 }
550
551 builder.ensure(compile::Test { compiler, target });
552 builder.ensure(native::TestHelpers { target });
Mark Simulacrumaa8b93b2017-07-07 18:31:29553 builder.ensure(RemoteCopyLibs { compiler, target });
Mark Simulacrum6b3413d2017-07-05 12:41:27554
Mark Simulacrum001e9f32017-07-05 01:41:43555 let _folder = build.fold_output(|| format!("test_{}", suite));
556 println!("Check compiletest suite={} mode={} ({} -> {})",
Mark Simulacrum528646e2017-07-14 00:48:44557 suite, mode, &compiler.host, target);
Mark Simulacrum6b3413d2017-07-05 12:41:27558 let mut cmd = builder.tool_cmd(Tool::Compiletest);
Alex Crichtonb325baf2016-04-05 18:34:23559
Mark Simulacrum001e9f32017-07-05 01:41:43560 // compiletest currently has... a lot of arguments, so let's just pass all
561 // of them!
Brian Anderson8401e372016-09-15 19:42:26562
Mark Simulacrumc114fe52017-07-05 17:21:33563 cmd.arg("--compile-lib-path").arg(builder.rustc_libdir(compiler));
Mark Simulacrum60388302017-07-05 16:46:41564 cmd.arg("--run-lib-path").arg(builder.sysroot_libdir(compiler, target));
Mark Simulacrumc114fe52017-07-05 17:21:33565 cmd.arg("--rustc-path").arg(builder.rustc(compiler));
566 cmd.arg("--rustdoc-path").arg(builder.rustdoc(compiler));
Mark Simulacrum001e9f32017-07-05 01:41:43567 cmd.arg("--src-base").arg(build.src.join("src/test").join(suite));
568 cmd.arg("--build-base").arg(testdir(build, compiler.host).join(suite));
569 cmd.arg("--stage-id").arg(format!("stage{}-{}", compiler.stage, target));
570 cmd.arg("--mode").arg(mode);
571 cmd.arg("--target").arg(target);
Mark Simulacrum528646e2017-07-14 00:48:44572 cmd.arg("--host").arg(&*compiler.host);
573 cmd.arg("--llvm-filecheck").arg(build.llvm_filecheck(build.build));
Alex Crichtonf4e4ec72016-05-13 22:26:41574
Mark Simulacrum001e9f32017-07-05 01:41:43575 if let Some(ref nodejs) = build.config.nodejs {
576 cmd.arg("--nodejs").arg(nodejs);
577 }
Alex Crichtonf4e4ec72016-05-13 22:26:41578
Mark Simulacrum001e9f32017-07-05 01:41:43579 let mut flags = vec!["-Crpath".to_string()];
580 if build.config.rust_optimize_tests {
581 flags.push("-O".to_string());
582 }
583 if build.config.rust_debuginfo_tests {
584 flags.push("-g".to_string());
585 }
Alex Crichtoncbe62922016-04-19 16:44:19586
Mark Simulacrum60388302017-07-05 16:46:41587 let mut hostflags = build.rustc_flags(compiler.host);
Mark Simulacrum001e9f32017-07-05 01:41:43588 hostflags.extend(flags.clone());
589 cmd.arg("--host-rustcflags").arg(hostflags.join(" "));
Alex Crichtoncbe62922016-04-19 16:44:19590
Mark Simulacrum528646e2017-07-14 00:48:44591 let mut targetflags = build.rustc_flags(target);
Mark Simulacrum001e9f32017-07-05 01:41:43592 targetflags.extend(flags);
593 targetflags.push(format!("-Lnative={}",
594 build.test_helpers_out(target).display()));
595 cmd.arg("--target-rustcflags").arg(targetflags.join(" "));
Alex Crichtonb325baf2016-04-05 18:34:23596
Mark Simulacrum001e9f32017-07-05 01:41:43597 cmd.arg("--docck-python").arg(build.python());
Alex Crichtonb325baf2016-04-05 18:34:23598
Mark Simulacrum001e9f32017-07-05 01:41:43599 if build.build.ends_with("apple-darwin") {
600 // Force /usr/bin/python on macOS for LLDB tests because we're loading the
601 // LLDB plugin's compiled module which only works with the system python
602 // (namely not Homebrew-installed python)
603 cmd.arg("--lldb-python").arg("/usr/bin/python");
604 } else {
605 cmd.arg("--lldb-python").arg(build.python());
606 }
Alex Crichtonb325baf2016-04-05 18:34:23607
Mark Simulacrum001e9f32017-07-05 01:41:43608 if let Some(ref gdb) = build.config.gdb {
609 cmd.arg("--gdb").arg(gdb);
610 }
611 if let Some(ref vers) = build.lldb_version {
612 cmd.arg("--lldb-version").arg(vers);
613 }
614 if let Some(ref dir) = build.lldb_python_dir {
615 cmd.arg("--lldb-python-dir").arg(dir);
616 }
617 let llvm_config = build.llvm_config(target);
618 let llvm_version = output(Command::new(&llvm_config).arg("--version"));
619 cmd.arg("--llvm-version").arg(llvm_version);
620 if !build.is_rust_llvm(target) {
621 cmd.arg("--system-llvm");
622 }
Alex Crichtonb325baf2016-04-05 18:34:23623
Mark Simulacrum001e9f32017-07-05 01:41:43624 cmd.args(&build.flags.cmd.test_args());
Corey Farwellc8c6d2c2016-10-30 01:58:52625
Mark Simulacrum001e9f32017-07-05 01:41:43626 if build.is_verbose() {
627 cmd.arg("--verbose");
628 }
Alex Crichton126e09e2016-04-14 22:51:03629
Mark Simulacrum001e9f32017-07-05 01:41:43630 if build.config.quiet_tests {
631 cmd.arg("--quiet");
632 }
Alex Crichton1747ce22017-01-28 21:38:06633
Mark Simulacrum001e9f32017-07-05 01:41:43634 // Only pass correct values for these flags for the `run-make` suite as it
635 // requires that a C++ compiler was configured which isn't always the case.
636 if suite == "run-make" {
637 let llvm_components = output(Command::new(&llvm_config).arg("--components"));
638 let llvm_cxxflags = output(Command::new(&llvm_config).arg("--cxxflags"));
639 cmd.arg("--cc").arg(build.cc(target))
640 .arg("--cxx").arg(build.cxx(target).unwrap())
641 .arg("--cflags").arg(build.cflags(target).join(" "))
642 .arg("--llvm-components").arg(llvm_components.trim())
643 .arg("--llvm-cxxflags").arg(llvm_cxxflags.trim());
644 } else {
645 cmd.arg("--cc").arg("")
646 .arg("--cxx").arg("")
647 .arg("--cflags").arg("")
648 .arg("--llvm-components").arg("")
649 .arg("--llvm-cxxflags").arg("");
650 }
651
652 if build.remote_tested(target) {
Mark Simulacrum6b3413d2017-07-05 12:41:27653 cmd.arg("--remote-test-client").arg(builder.tool_exe(Tool::RemoteTestClient));
Mark Simulacrum001e9f32017-07-05 01:41:43654 }
655
656 // Running a C compiler on MSVC requires a few env vars to be set, to be
657 // sure to set them here.
658 //
659 // Note that if we encounter `PATH` we make sure to append to our own `PATH`
660 // rather than stomp over it.
661 if target.contains("msvc") {
Mark Simulacrum528646e2017-07-14 00:48:44662 for &(ref k, ref v) in build.cc[&target].0.env() {
Mark Simulacrum001e9f32017-07-05 01:41:43663 if k != "PATH" {
664 cmd.env(k, v);
665 }
Alex Crichton126e09e2016-04-14 22:51:03666 }
667 }
Mark Simulacrum001e9f32017-07-05 01:41:43668 cmd.env("RUSTC_BOOTSTRAP", "1");
669 build.add_rust_test_threads(&mut cmd);
670
671 if build.config.sanitizers {
672 cmd.env("SANITIZER_SUPPORT", "1");
673 }
674
675 if build.config.profiler {
676 cmd.env("PROFILER_SUPPORT", "1");
677 }
678
679 cmd.arg("--adb-path").arg("adb");
680 cmd.arg("--adb-test-dir").arg(ADB_TEST_DIR);
681 if target.contains("android") {
682 // Assume that cc for this target comes from the android sysroot
683 cmd.arg("--android-cross-path")
684 .arg(build.cc(target).parent().unwrap().parent().unwrap());
685 } else {
686 cmd.arg("--android-cross-path").arg("");
687 }
688
689 build.ci_env.force_coloring_in_ci(&mut cmd);
690
691 let _time = util::timeit();
692 try_run(build, &mut cmd);
Alex Crichton126e09e2016-04-14 22:51:03693 }
Alex Crichtonb325baf2016-04-05 18:34:23694}
Alex Crichtonede89442016-04-15 01:00:35695
Mark Simulacrum528646e2017-07-14 00:48:44696#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
697pub struct Docs {
698 compiler: Compiler,
Mark Simulacruma5ab2ce2017-07-12 15:15:00699}
700
Mark Simulacrum528646e2017-07-14 00:48:44701impl Step for Docs {
Mark Simulacruma5ab2ce2017-07-12 15:15:00702 type Output = ();
703 const DEFAULT: bool = true;
704 const ONLY_HOSTS: bool = true;
Alex Crichtonede89442016-04-15 01:00:35705
Mark Simulacrum56128fb2017-07-19 00:03:38706 fn should_run(run: ShouldRun) -> ShouldRun {
707 run.path("src/doc")
Mark Simulacruma5ab2ce2017-07-12 15:15:00708 }
709
Mark Simulacrum6a67a052017-07-20 23:51:07710 fn make_run(run: RunConfig) {
711 run.builder.ensure(Docs {
712 compiler: run.builder.compiler(run.builder.top_stage, run.host),
Mark Simulacruma5ab2ce2017-07-12 15:15:00713 });
714 }
715
716 /// Run `rustdoc --test` for all documentation in `src/doc`.
717 ///
718 /// This will run all tests in our markdown documentation (e.g. the book)
719 /// located in `src/doc`. The `rustdoc` that's run is the one that sits next to
720 /// `compiler`.
721 fn run(self, builder: &Builder) {
722 let build = builder.build;
723 let compiler = self.compiler;
Mark Simulacrumceecd622017-07-12 16:12:47724
725 builder.ensure(compile::Test { compiler, target: compiler.host });
726
Mark Simulacruma5ab2ce2017-07-12 15:15:00727 // Do a breadth-first traversal of the `src/doc` directory and just run
728 // tests for all files that end in `*.md`
729 let mut stack = vec![build.src.join("src/doc")];
730 let _time = util::timeit();
731 let _folder = build.fold_output(|| "test_docs");
732
733 while let Some(p) = stack.pop() {
734 if p.is_dir() {
735 stack.extend(t!(p.read_dir()).map(|p| t!(p).path()));
736 continue
737 }
738
739 if p.extension().and_then(|s| s.to_str()) != Some("md") {
740 continue;
741 }
742
743 // The nostarch directory in the book is for no starch, and so isn't
744 // guaranteed to build. We don't care if it doesn't build, so skip it.
745 if p.to_str().map_or(false, |p| p.contains("nostarch")) {
746 continue;
747 }
748
749 markdown_test(builder, compiler, &p);
Alex Crichtonede89442016-04-15 01:00:35750 }
Alex Crichtonede89442016-04-15 01:00:35751 }
752}
753
Mark Simulacrum528646e2017-07-14 00:48:44754#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
755pub struct ErrorIndex {
756 compiler: Compiler,
Mark Simulacrum001e9f32017-07-05 01:41:43757}
Alex Crichton0e272de2016-11-16 20:31:19758
Mark Simulacrum528646e2017-07-14 00:48:44759impl Step for ErrorIndex {
Mark Simulacrum001e9f32017-07-05 01:41:43760 type Output = ();
Mark Simulacrum6b3413d2017-07-05 12:41:27761 const DEFAULT: bool = true;
762 const ONLY_HOSTS: bool = true;
763
Mark Simulacrum56128fb2017-07-19 00:03:38764 fn should_run(run: ShouldRun) -> ShouldRun {
765 run.path("src/tools/error_index_generator")
Mark Simulacrum6b3413d2017-07-05 12:41:27766 }
767
Mark Simulacrum6a67a052017-07-20 23:51:07768 fn make_run(run: RunConfig) {
769 run.builder.ensure(ErrorIndex {
770 compiler: run.builder.compiler(run.builder.top_stage, run.host),
Mark Simulacrum6b3413d2017-07-05 12:41:27771 });
772 }
Alex Crichtonede89442016-04-15 01:00:35773
Mark Simulacrum001e9f32017-07-05 01:41:43774 /// Run the error index generator tool to execute the tests located in the error
775 /// index.
776 ///
777 /// The `error_index_generator` tool lives in `src/tools` and is used to
778 /// generate a markdown file from the error indexes of the code base which is
779 /// then passed to `rustdoc --test`.
780 fn run(self, builder: &Builder) {
781 let build = builder.build;
782 let compiler = self.compiler;
783
Mark Simulacrum6b3413d2017-07-05 12:41:27784 builder.ensure(compile::Std { compiler, target: compiler.host });
785
Mark Simulacrum001e9f32017-07-05 01:41:43786 let _folder = build.fold_output(|| "test_error_index");
787 println!("Testing error-index stage{}", compiler.stage);
788
789 let dir = testdir(build, compiler.host);
790 t!(fs::create_dir_all(&dir));
791 let output = dir.join("error-index.md");
792
793 let _time = util::timeit();
Mark Simulacrum60388302017-07-05 16:46:41794 build.run(builder.tool_cmd(Tool::ErrorIndex)
Mark Simulacrum001e9f32017-07-05 01:41:43795 .arg("markdown")
796 .arg(&output)
797 .env("CFG_BUILD", &build.build));
798
Mark Simulacrumc114fe52017-07-05 17:21:33799 markdown_test(builder, compiler, &output);
Mark Simulacrum001e9f32017-07-05 01:41:43800 }
Alex Crichtonede89442016-04-15 01:00:35801}
802
Mark Simulacrumc114fe52017-07-05 17:21:33803fn markdown_test(builder: &Builder, compiler: Compiler, markdown: &Path) {
804 let build = builder.build;
Mark Simulacrumdd1d75e2017-06-04 23:55:50805 let mut file = t!(File::open(markdown));
806 let mut contents = String::new();
807 t!(file.read_to_string(&mut contents));
808 if !contents.contains("```") {
809 return;
810 }
811
Mark Simulacrumbc8fabb2017-06-06 18:00:22812 println!("doc tests for: {}", markdown.display());
Mark Simulacrumc114fe52017-07-05 17:21:33813 let mut cmd = Command::new(builder.rustdoc(compiler));
814 builder.add_rustc_lib_path(compiler, &mut cmd);
Alex Crichton0e272de2016-11-16 20:31:19815 build.add_rust_test_threads(&mut cmd);
Alex Crichtonede89442016-04-15 01:00:35816 cmd.arg("--test");
817 cmd.arg(markdown);
Alex Crichton6f62fae2016-12-12 17:03:35818 cmd.env("RUSTC_BOOTSTRAP", "1");
Corey Farwellc8c6d2c2016-10-30 01:58:52819
kennytm6ac07872017-05-21 20:27:47820 let test_args = build.flags.cmd.test_args().join(" ");
Corey Farwellc8c6d2c2016-10-30 01:58:52821 cmd.arg("--test-args").arg(test_args);
822
kennytm6ac07872017-05-21 20:27:47823 if build.config.quiet_tests {
Josh Stone617aea42017-06-02 16:27:44824 try_run_quiet(build, &mut cmd);
kennytm6ac07872017-05-21 20:27:47825 } else {
Josh Stone617aea42017-06-02 16:27:44826 try_run(build, &mut cmd);
kennytm6ac07872017-05-21 20:27:47827 }
Alex Crichtonede89442016-04-15 01:00:35828}
Alex Crichtonbb9062a2016-04-29 21:23:15829
Mark Simulacrum528646e2017-07-14 00:48:44830#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
Mark Simulacrum981afa52017-07-18 21:28:53831pub struct CrateLibrustc {
Mark Simulacrum528646e2017-07-14 00:48:44832 compiler: Compiler,
833 target: Interned<String>,
Mark Simulacrum6b3413d2017-07-05 12:41:27834 test_kind: TestKind,
Mark Simulacrum528646e2017-07-14 00:48:44835 krate: Option<Interned<String>>,
Mark Simulacrum6b3413d2017-07-05 12:41:27836}
837
Mark Simulacrum981afa52017-07-18 21:28:53838impl Step for CrateLibrustc {
Mark Simulacrum6b3413d2017-07-05 12:41:27839 type Output = ();
Mark Simulacrum6b3413d2017-07-05 12:41:27840 const DEFAULT: bool = true;
841 const ONLY_HOSTS: bool = true;
842
Mark Simulacrum56128fb2017-07-19 00:03:38843 fn should_run(run: ShouldRun) -> ShouldRun {
844 run.krate("rustc-main")
Mark Simulacrum6b3413d2017-07-05 12:41:27845 }
846
Mark Simulacrum6a67a052017-07-20 23:51:07847 fn make_run(run: RunConfig) {
848 let builder = run.builder;
849 let compiler = builder.compiler(builder.top_stage, run.host);
Mark Simulacrum6b3413d2017-07-05 12:41:27850
Mark Simulacrum6a67a052017-07-20 23:51:07851 let make = |name: Option<Interned<String>>| {
Mark Simulacrum6b3413d2017-07-05 12:41:27852 let test_kind = if builder.kind == Kind::Test {
853 TestKind::Test
854 } else if builder.kind == Kind::Bench {
855 TestKind::Bench
856 } else {
Mark Simulacrum981afa52017-07-18 21:28:53857 panic!("unexpected builder.kind in crate: {:?}", builder.kind);
Mark Simulacrum6b3413d2017-07-05 12:41:27858 };
859
Mark Simulacrum981afa52017-07-18 21:28:53860 builder.ensure(CrateLibrustc {
Mark Simulacrum6b3413d2017-07-05 12:41:27861 compiler,
Mark Simulacrum6a67a052017-07-20 23:51:07862 target: run.target,
Mark Simulacrum6b3413d2017-07-05 12:41:27863 test_kind: test_kind,
864 krate: name,
865 });
866 };
867
Mark Simulacrum6a67a052017-07-20 23:51:07868 if let Some(path) = run.path {
Mark Simulacrum6b3413d2017-07-05 12:41:27869 for (name, krate_path) in builder.crates("rustc-main") {
870 if path.ends_with(krate_path) {
Mark Simulacrum6a67a052017-07-20 23:51:07871 make(Some(name));
Mark Simulacrum6b3413d2017-07-05 12:41:27872 }
873 }
874 } else {
Mark Simulacrum6a67a052017-07-20 23:51:07875 make(None);
Mark Simulacrum6b3413d2017-07-05 12:41:27876 }
877 }
878
879
880 fn run(self, builder: &Builder) {
Mark Simulacrum981afa52017-07-18 21:28:53881 builder.ensure(Crate {
Mark Simulacrum6b3413d2017-07-05 12:41:27882 compiler: self.compiler,
883 target: self.target,
884 mode: Mode::Librustc,
885 test_kind: self.test_kind,
886 krate: self.krate,
887 });
888 }
889}
890
891
Mark Simulacrum528646e2017-07-14 00:48:44892#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
Mark Simulacrum981afa52017-07-18 21:28:53893pub struct Crate {
Mark Simulacrum528646e2017-07-14 00:48:44894 compiler: Compiler,
895 target: Interned<String>,
Mark Simulacrum001e9f32017-07-05 01:41:43896 mode: Mode,
897 test_kind: TestKind,
Mark Simulacrum528646e2017-07-14 00:48:44898 krate: Option<Interned<String>>,
Mark Simulacrum001e9f32017-07-05 01:41:43899}
Alex Crichtonbb9062a2016-04-29 21:23:15900
Mark Simulacrum981afa52017-07-18 21:28:53901impl Step for Crate {
Mark Simulacrum001e9f32017-07-05 01:41:43902 type Output = ();
Mark Simulacrum6b3413d2017-07-05 12:41:27903 const DEFAULT: bool = true;
904
Mark Simulacrum56128fb2017-07-19 00:03:38905 fn should_run(run: ShouldRun) -> ShouldRun {
906 run.krate("std").krate("test")
Mark Simulacrum6b3413d2017-07-05 12:41:27907 }
908
Mark Simulacrum6a67a052017-07-20 23:51:07909 fn make_run(run: RunConfig) {
910 let builder = run.builder;
911 let compiler = builder.compiler(builder.top_stage, run.host);
Mark Simulacrum6b3413d2017-07-05 12:41:27912
Mark Simulacrum6a67a052017-07-20 23:51:07913 let make = |mode: Mode, name: Option<Interned<String>>| {
Mark Simulacrum6b3413d2017-07-05 12:41:27914 let test_kind = if builder.kind == Kind::Test {
915 TestKind::Test
916 } else if builder.kind == Kind::Bench {
917 TestKind::Bench
918 } else {
Mark Simulacrum981afa52017-07-18 21:28:53919 panic!("unexpected builder.kind in crate: {:?}", builder.kind);
Mark Simulacrum6b3413d2017-07-05 12:41:27920 };
921
Mark Simulacrum981afa52017-07-18 21:28:53922 builder.ensure(Crate {
Mark Simulacrum6a67a052017-07-20 23:51:07923 compiler,
924 target: run.target,
Mark Simulacrum6b3413d2017-07-05 12:41:27925 mode: mode,
926 test_kind: test_kind,
927 krate: name,
928 });
929 };
930
Mark Simulacrum6a67a052017-07-20 23:51:07931 if let Some(path) = run.path {
Mark Simulacrum6b3413d2017-07-05 12:41:27932 for (name, krate_path) in builder.crates("std") {
933 if path.ends_with(krate_path) {
Mark Simulacrum6a67a052017-07-20 23:51:07934 make(Mode::Libstd, Some(name));
Mark Simulacrum6b3413d2017-07-05 12:41:27935 }
936 }
937 for (name, krate_path) in builder.crates("test") {
938 if path.ends_with(krate_path) {
Mark Simulacrum6a67a052017-07-20 23:51:07939 make(Mode::Libtest, Some(name));
Mark Simulacrum6b3413d2017-07-05 12:41:27940 }
941 }
942 } else {
Mark Simulacrum6a67a052017-07-20 23:51:07943 make(Mode::Libstd, None);
944 make(Mode::Libtest, None);
Mark Simulacrum6b3413d2017-07-05 12:41:27945 }
946 }
Alex Crichton7046fea2016-12-25 23:20:33947
Mark Simulacrum001e9f32017-07-05 01:41:43948 /// Run all unit tests plus documentation tests for an entire crate DAG defined
949 /// by a `Cargo.toml`
950 ///
951 /// This is what runs tests for crates like the standard library, compiler, etc.
952 /// It essentially is the driver for running `cargo test`.
953 ///
954 /// Currently this runs all tests for a DAG by passing a bunch of `-p foo`
955 /// arguments, and those arguments are discovered from `cargo metadata`.
956 fn run(self, builder: &Builder) {
957 let build = builder.build;
958 let compiler = self.compiler;
959 let target = self.target;
960 let mode = self.mode;
961 let test_kind = self.test_kind;
962 let krate = self.krate;
Alex Crichtonbb9062a2016-04-29 21:23:15963
Mark Simulacrum6b3413d2017-07-05 12:41:27964 builder.ensure(compile::Test { compiler, target });
965 builder.ensure(RemoteCopyLibs { compiler, target });
Mark Simulacrum001e9f32017-07-05 01:41:43966 let (name, path, features, root) = match mode {
967 Mode::Libstd => {
968 ("libstd", "src/libstd", build.std_features(), "std")
969 }
970 Mode::Libtest => {
971 ("libtest", "src/libtest", String::new(), "test")
972 }
973 Mode::Librustc => {
Mark Simulacrumceecd622017-07-12 16:12:47974 builder.ensure(compile::Rustc { compiler, target });
Mark Simulacrum001e9f32017-07-05 01:41:43975 ("librustc", "src/rustc", build.rustc_features(), "rustc-main")
976 }
977 _ => panic!("can only test libraries"),
978 };
Mark Simulacrum528646e2017-07-14 00:48:44979 let root = INTERNER.intern_string(String::from(root));
Mark Simulacrum001e9f32017-07-05 01:41:43980 let _folder = build.fold_output(|| {
981 format!("{}_stage{}-{}", test_kind.subcommand(), compiler.stage, name)
982 });
983 println!("{} {} stage{} ({} -> {})", test_kind, name, compiler.stage,
Mark Simulacrum528646e2017-07-14 00:48:44984 &compiler.host, target);
Mark Simulacrum001e9f32017-07-05 01:41:43985
986 // If we're not doing a full bootstrap but we're testing a stage2 version of
987 // libstd, then what we're actually testing is the libstd produced in
988 // stage1. Reflect that here by updating the compiler that we're working
989 // with automatically.
990 let compiler = if build.force_use_stage1(compiler, target) {
Mark Simulacrum6b3413d2017-07-05 12:41:27991 builder.compiler(1, compiler.host)
Mark Simulacrum001e9f32017-07-05 01:41:43992 } else {
993 compiler.clone()
994 };
995
996 // Build up the base `cargo test` command.
997 //
998 // Pass in some standard flags then iterate over the graph we've discovered
999 // in `cargo metadata` with the maps above and figure out what `-p`
1000 // arguments need to get passed.
Mark Simulacrumc114fe52017-07-05 17:21:331001 let mut cargo = builder.cargo(compiler, mode, target, test_kind.subcommand());
Mark Simulacrum001e9f32017-07-05 01:41:431002 cargo.arg("--manifest-path")
1003 .arg(build.src.join(path).join("Cargo.toml"))
1004 .arg("--features").arg(features);
1005 if test_kind.subcommand() == "test" && !build.fail_fast {
1006 cargo.arg("--no-fail-fast");
Alex Crichtonbb9062a2016-04-29 21:23:151007 }
Mark Simulacrum001e9f32017-07-05 01:41:431008
1009 match krate {
1010 Some(krate) => {
1011 cargo.arg("-p").arg(krate);
1012 }
1013 None => {
1014 let mut visited = HashSet::new();
1015 let mut next = vec![root];
1016 while let Some(name) = next.pop() {
1017 // Right now jemalloc is our only target-specific crate in the
1018 // sense that it's not present on all platforms. Custom skip it
1019 // here for now, but if we add more this probably wants to get
1020 // more generalized.
1021 //
1022 // Also skip `build_helper` as it's not compiled normally for
1023 // target during the bootstrap and it's just meant to be a
1024 // helper crate, not tested. If it leaks through then it ends up
1025 // messing with various mtime calculations and such.
Mark Simulacrum528646e2017-07-14 00:48:441026 if !name.contains("jemalloc") && *name != *"build_helper" {
Mark Simulacrum001e9f32017-07-05 01:41:431027 cargo.arg("-p").arg(&format!("{}:0.0.0", name));
1028 }
Mark Simulacrum528646e2017-07-14 00:48:441029 for dep in build.crates[&name].deps.iter() {
Mark Simulacrum001e9f32017-07-05 01:41:431030 if visited.insert(dep) {
Mark Simulacrum528646e2017-07-14 00:48:441031 next.push(*dep);
Mark Simulacrum001e9f32017-07-05 01:41:431032 }
Alex Crichtona270b802016-10-21 20:18:091033 }
1034 }
Alex Crichtonbb9062a2016-04-29 21:23:151035 }
1036 }
Alex Crichtonbb9062a2016-04-29 21:23:151037
Mark Simulacrum001e9f32017-07-05 01:41:431038 // The tests are going to run with the *target* libraries, so we need to
1039 // ensure that those libraries show up in the LD_LIBRARY_PATH equivalent.
1040 //
1041 // Note that to run the compiler we need to run with the *host* libraries,
1042 // but our wrapper scripts arrange for that to be the case anyway.
1043 let mut dylib_path = dylib_path();
Mark Simulacrum528646e2017-07-14 00:48:441044 dylib_path.insert(0, PathBuf::from(&*builder.sysroot_libdir(compiler, target)));
Mark Simulacrum001e9f32017-07-05 01:41:431045 cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
Alex Crichtonbb9062a2016-04-29 21:23:151046
Mark Simulacrum001e9f32017-07-05 01:41:431047 if target.contains("emscripten") || build.remote_tested(target) {
1048 cargo.arg("--no-run");
1049 }
Alex Crichton0e272de2016-11-16 20:31:191050
Mark Simulacrum001e9f32017-07-05 01:41:431051 cargo.arg("--");
Alex Crichton0e272de2016-11-16 20:31:191052
Mark Simulacrum001e9f32017-07-05 01:41:431053 if build.config.quiet_tests {
1054 cargo.arg("--quiet");
1055 }
Corey Farwellc8c6d2c2016-10-30 01:58:521056
Mark Simulacrum001e9f32017-07-05 01:41:431057 let _time = util::timeit();
Alex Crichton0e272de2016-11-16 20:31:191058
Mark Simulacrum001e9f32017-07-05 01:41:431059 if target.contains("emscripten") {
1060 build.run(&mut cargo);
Mark Simulacrum60388302017-07-05 16:46:411061 krate_emscripten(build, compiler, target, mode);
Mark Simulacrum001e9f32017-07-05 01:41:431062 } else if build.remote_tested(target) {
1063 build.run(&mut cargo);
Mark Simulacrum60388302017-07-05 16:46:411064 krate_remote(builder, compiler, target, mode);
Mark Simulacrum001e9f32017-07-05 01:41:431065 } else {
1066 cargo.args(&build.flags.cmd.test_args());
1067 try_run(build, &mut cargo);
1068 }
Alex Crichton39a5d3f2016-06-28 20:31:301069 }
1070}
1071
Brian Andersonb8b50f02016-09-06 00:41:501072fn krate_emscripten(build: &Build,
Mark Simulacrum60388302017-07-05 16:46:411073 compiler: Compiler,
Mark Simulacrum528646e2017-07-14 00:48:441074 target: Interned<String>,
Brian Andersonb8b50f02016-09-06 00:41:501075 mode: Mode) {
Alex Crichton1747ce22017-01-28 21:38:061076 let out_dir = build.cargo_out(compiler, mode, target);
Mark Simulacrum5b44cbc2017-06-26 16:23:501077 let tests = find_tests(&out_dir.join("deps"), target);
Ross Schulmanad9184c2016-09-05 23:56:481078
Mark Simulacrum5b44cbc2017-06-26 16:23:501079 let nodejs = build.config.nodejs.as_ref().expect("nodejs not configured");
Alex Crichton1747ce22017-01-28 21:38:061080 for test in tests {
Mark Simulacrum5b44cbc2017-06-26 16:23:501081 println!("running {}", test.display());
Alex Crichton1747ce22017-01-28 21:38:061082 let mut cmd = Command::new(nodejs);
Mark Simulacrum5b44cbc2017-06-26 16:23:501083 cmd.arg(&test);
Alex Crichton1747ce22017-01-28 21:38:061084 if build.config.quiet_tests {
1085 cmd.arg("--quiet");
1086 }
Josh Stone617aea42017-06-02 16:27:441087 try_run(build, &mut cmd);
Alex Crichton1747ce22017-01-28 21:38:061088 }
1089}
1090
Mark Simulacrum60388302017-07-05 16:46:411091fn krate_remote(builder: &Builder,
1092 compiler: Compiler,
Mark Simulacrum528646e2017-07-14 00:48:441093 target: Interned<String>,
Alex Crichton7bc2cbf2017-04-26 15:52:191094 mode: Mode) {
Mark Simulacrum60388302017-07-05 16:46:411095 let build = builder.build;
Alex Crichton1747ce22017-01-28 21:38:061096 let out_dir = build.cargo_out(compiler, mode, target);
Mark Simulacrum5b44cbc2017-06-26 16:23:501097 let tests = find_tests(&out_dir.join("deps"), target);
Alex Crichton1747ce22017-01-28 21:38:061098
Mark Simulacrum6b3413d2017-07-05 12:41:271099 let tool = builder.tool_exe(Tool::RemoteTestClient);
Alex Crichton1747ce22017-01-28 21:38:061100 for test in tests {
1101 let mut cmd = Command::new(&tool);
1102 cmd.arg("run")
1103 .arg(&test);
1104 if build.config.quiet_tests {
1105 cmd.arg("--quiet");
1106 }
1107 cmd.args(&build.flags.cmd.test_args());
Josh Stone617aea42017-06-02 16:27:441108 try_run(build, &mut cmd);
Alex Crichton1747ce22017-01-28 21:38:061109 }
1110}
Ross Schulmanad9184c2016-09-05 23:56:481111
Mark Simulacrum528646e2017-07-14 00:48:441112fn find_tests(dir: &Path, target: Interned<String>) -> Vec<PathBuf> {
Mark Simulacrum5b44cbc2017-06-26 16:23:501113 let mut dst = Vec::new();
Alex Crichton39a5d3f2016-06-28 20:31:301114 for e in t!(dir.read_dir()).map(|e| t!(e)) {
1115 let file_type = t!(e.file_type());
1116 if !file_type.is_file() {
1117 continue
1118 }
1119 let filename = e.file_name().into_string().unwrap();
1120 if (target.contains("windows") && filename.ends_with(".exe")) ||
Ross Schulmanad9184c2016-09-05 23:56:481121 (!target.contains("windows") && !filename.contains(".")) ||
Marco A L Barbosa554f21b2017-06-13 12:32:491122 (target.contains("emscripten") &&
1123 filename.ends_with(".js") &&
1124 !filename.ends_with(".asm.js")) {
Alex Crichton39a5d3f2016-06-28 20:31:301125 dst.push(e.path());
1126 }
1127 }
Mark Simulacrum5b44cbc2017-06-26 16:23:501128 dst
Alex Crichton39a5d3f2016-06-28 20:31:301129}
1130
Mark Simulacrumceecd622017-07-12 16:12:471131/// Some test suites are run inside emulators or on remote devices, and most
1132/// of our test binaries are linked dynamically which means we need to ship
1133/// the standard library and such to the emulator ahead of time. This step
1134/// represents this and is a dependency of all test suites.
1135///
1136/// Most of the time this is a noop. For some steps such as shipping data to
1137/// QEMU we have to build our own tools so we've got conditional dependencies
1138/// on those programs as well. Note that the remote test client is built for
1139/// the build target (us) and the server is built for the target.
Mark Simulacrum528646e2017-07-14 00:48:441140#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1141pub struct RemoteCopyLibs {
1142 compiler: Compiler,
1143 target: Interned<String>,
Mark Simulacrum001e9f32017-07-05 01:41:431144}
Alex Crichton1747ce22017-01-28 21:38:061145
Mark Simulacrum528646e2017-07-14 00:48:441146impl Step for RemoteCopyLibs {
Mark Simulacrum001e9f32017-07-05 01:41:431147 type Output = ();
Alex Crichton1747ce22017-01-28 21:38:061148
Mark Simulacrum56128fb2017-07-19 00:03:381149 fn should_run(run: ShouldRun) -> ShouldRun {
1150 run.never()
Mark Simulacrum681b1232017-07-14 12:30:161151 }
1152
Mark Simulacrum001e9f32017-07-05 01:41:431153 fn run(self, builder: &Builder) {
1154 let build = builder.build;
1155 let compiler = self.compiler;
1156 let target = self.target;
1157 if !build.remote_tested(target) {
1158 return
1159 }
Alex Crichton1747ce22017-01-28 21:38:061160
Mark Simulacrum6b3413d2017-07-05 12:41:271161 builder.ensure(compile::Test { compiler, target });
1162
Mark Simulacrum001e9f32017-07-05 01:41:431163 println!("REMOTE copy libs to emulator ({})", target);
1164 t!(fs::create_dir_all(build.out.join("tmp")));
1165
Mark Simulacrum5984e702017-07-13 00:52:311166 let server = builder.ensure(tool::RemoteTestServer { stage: compiler.stage, target });
Mark Simulacrum001e9f32017-07-05 01:41:431167
1168 // Spawn the emulator and wait for it to come online
Mark Simulacrum6b3413d2017-07-05 12:41:271169 let tool = builder.tool_exe(Tool::RemoteTestClient);
Mark Simulacrum001e9f32017-07-05 01:41:431170 let mut cmd = Command::new(&tool);
1171 cmd.arg("spawn-emulator")
1172 .arg(target)
1173 .arg(&server)
1174 .arg(build.out.join("tmp"));
1175 if let Some(rootfs) = build.qemu_rootfs(target) {
1176 cmd.arg(rootfs);
1177 }
1178 build.run(&mut cmd);
1179
1180 // Push all our dylibs to the emulator
Mark Simulacrum60388302017-07-05 16:46:411181 for f in t!(builder.sysroot_libdir(compiler, target).read_dir()) {
Mark Simulacrum001e9f32017-07-05 01:41:431182 let f = t!(f);
1183 let name = f.file_name().into_string().unwrap();
1184 if util::is_dylib(&name) {
1185 build.run(Command::new(&tool)
1186 .arg("push")
1187 .arg(f.path()));
1188 }
Alex Crichton1747ce22017-01-28 21:38:061189 }
1190 }
1191}
1192
Mark Simulacrum528646e2017-07-14 00:48:441193#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
Mark Simulacrum001e9f32017-07-05 01:41:431194pub struct Distcheck;
1195
Mark Simulacrum528646e2017-07-14 00:48:441196impl Step for Distcheck {
Mark Simulacrum001e9f32017-07-05 01:41:431197 type Output = ();
1198
Mark Simulacrum56128fb2017-07-19 00:03:381199 fn should_run(run: ShouldRun) -> ShouldRun {
1200 run.path("distcheck")
Mark Simulacrum681b1232017-07-14 12:30:161201 }
1202
Mark Simulacrum8f2e5762017-07-22 13:35:421203 fn make_run(run: RunConfig) {
1204 run.builder.ensure(Distcheck);
1205 }
1206
Mark Simulacrum001e9f32017-07-05 01:41:431207 /// Run "distcheck", a 'make check' from a tarball
1208 fn run(self, builder: &Builder) {
1209 let build = builder.build;
1210
Mark Simulacrum528646e2017-07-14 00:48:441211 if *build.build != *"x86_64-unknown-linux-gnu" {
Mark Simulacrum001e9f32017-07-05 01:41:431212 return
1213 }
1214 if !build.config.host.iter().any(|s| s == "x86_64-unknown-linux-gnu") {
1215 return
1216 }
1217 if !build.config.target.iter().any(|s| s == "x86_64-unknown-linux-gnu") {
1218 return
1219 }
1220
1221 println!("Distcheck");
1222 let dir = build.out.join("tmp").join("distcheck");
1223 let _ = fs::remove_dir_all(&dir);
1224 t!(fs::create_dir_all(&dir));
1225
Mark Simulacrum1c118232017-07-22 16:48:291226 // Guarantee that these are built before we begin running.
1227 builder.ensure(dist::PlainSourceTarball);
1228 builder.ensure(dist::Src);
1229
Mark Simulacrum001e9f32017-07-05 01:41:431230 let mut cmd = Command::new("tar");
1231 cmd.arg("-xzf")
Mark Simulacrum5984e702017-07-13 00:52:311232 .arg(builder.ensure(dist::PlainSourceTarball))
Mark Simulacrum001e9f32017-07-05 01:41:431233 .arg("--strip-components=1")
1234 .current_dir(&dir);
1235 build.run(&mut cmd);
1236 build.run(Command::new("./configure")
1237 .args(&build.config.configure_args)
1238 .arg("--enable-vendor")
1239 .current_dir(&dir));
1240 build.run(Command::new(build_helper::make(&build.build))
1241 .arg("check")
1242 .current_dir(&dir));
1243
1244 // Now make sure that rust-src has all of libstd's dependencies
1245 println!("Distcheck rust-src");
1246 let dir = build.out.join("tmp").join("distcheck-src");
1247 let _ = fs::remove_dir_all(&dir);
1248 t!(fs::create_dir_all(&dir));
1249
1250 let mut cmd = Command::new("tar");
1251 cmd.arg("-xzf")
Mark Simulacrum5984e702017-07-13 00:52:311252 .arg(builder.ensure(dist::Src))
Mark Simulacrum001e9f32017-07-05 01:41:431253 .arg("--strip-components=1")
1254 .current_dir(&dir);
1255 build.run(&mut cmd);
1256
1257 let toml = dir.join("rust-src/lib/rustlib/src/rust/src/libstd/Cargo.toml");
1258 build.run(Command::new(&build.initial_cargo)
1259 .arg("generate-lockfile")
1260 .arg("--manifest-path")
1261 .arg(&toml)
1262 .current_dir(&dir));
Alex Crichtond38db822016-12-09 01:13:551263 }
Alex Crichtond38db822016-12-09 01:13:551264}
Alex Crichton1a040b32016-12-31 03:50:571265
Mark Simulacrum528646e2017-07-14 00:48:441266#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
Mark Simulacrum001e9f32017-07-05 01:41:431267pub struct Bootstrap;
1268
Mark Simulacrum528646e2017-07-14 00:48:441269impl Step for Bootstrap {
Mark Simulacrum001e9f32017-07-05 01:41:431270 type Output = ();
Mark Simulacrum6b3413d2017-07-05 12:41:271271 const DEFAULT: bool = true;
1272 const ONLY_HOSTS: bool = true;
1273 const ONLY_BUILD: bool = true;
Mark Simulacrum001e9f32017-07-05 01:41:431274
1275 /// Test the build system itself
1276 fn run(self, builder: &Builder) {
1277 let build = builder.build;
1278 let mut cmd = Command::new(&build.initial_cargo);
1279 cmd.arg("test")
1280 .current_dir(build.src.join("src/bootstrap"))
1281 .env("CARGO_TARGET_DIR", build.out.join("bootstrap"))
1282 .env("RUSTC_BOOTSTRAP", "1")
1283 .env("RUSTC", &build.initial_rustc);
1284 if !build.fail_fast {
1285 cmd.arg("--no-fail-fast");
1286 }
1287 cmd.arg("--").args(&build.flags.cmd.test_args());
1288 try_run(build, &mut cmd);
Josh Stone617aea42017-06-02 16:27:441289 }
Mark Simulacrum6b3413d2017-07-05 12:41:271290
Mark Simulacrum56128fb2017-07-19 00:03:381291 fn should_run(run: ShouldRun) -> ShouldRun {
1292 run.path("src/bootstrap")
Mark Simulacrum6b3413d2017-07-05 12:41:271293 }
1294
Mark Simulacrum6a67a052017-07-20 23:51:071295 fn make_run(run: RunConfig) {
1296 run.builder.ensure(Bootstrap);
Mark Simulacrum6b3413d2017-07-05 12:41:271297 }
Alex Crichton1a040b32016-12-31 03:50:571298}