diff options
| author | Brad Gibson <b2b@humanenginuity.com> | 2018-05-06 07:56:53 -0700 |
|---|---|---|
| committer | Brad Gibson <b2b@humanenginuity.com> | 2018-05-06 07:56:53 -0700 |
| commit | 6a78c0a10f2e719117fe4bb929bfb38549acfeec (patch) | |
| tree | 0089dcdd34bfa5ba430ed33163264b147677be59 /src/bootstrap/test.rs | |
| parent | e1d5509bf381d978a1894b6ba869c3b56dd3eeca (diff) | |
| parent | 6f721f54c6fb1de9cf00eb9d2d050f818c882871 (diff) | |
resolved conflict with upstream commit
Diffstat (limited to 'src/bootstrap/test.rs')
| -rw-r--r-- | src/bootstrap/test.rs | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 08bbd68c756..cbb952bab61 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -32,13 +32,13 @@ use dist; use native; use tool::{self, Tool}; use util::{self, dylib_path, dylib_path_var}; -use Mode; +use {Mode, DocTests}; use toolstate::ToolState; const ADB_TEST_DIR: &str = "/data/tmp/work"; /// The two modes of the test runner; tests or benchmarks. -#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone)] +#[derive(Debug, PartialEq, Eq, Hash, Copy, Clone, PartialOrd, Ord)] pub enum TestKind { /// Run `cargo test` Test, @@ -1212,6 +1212,7 @@ test_book!( Nomicon, "src/doc/nomicon", "nomicon", default=false; Reference, "src/doc/reference", "reference", default=false; RustdocBook, "src/doc/rustdoc", "rustdoc", default=true; + RustcBook, "src/doc/rustc", "rustc", default=true; RustByExample, "src/doc/rust-by-example", "rust-by-example", default=false; TheBook, "src/doc/book", "book", default=false; UnstableBook, "src/doc/unstable-book", "unstable-book", default=true; @@ -1406,13 +1407,13 @@ impl Step for CrateNotDefault { } -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Crate { - compiler: Compiler, - target: Interned<String>, - mode: Mode, - test_kind: TestKind, - krate: Interned<String>, + pub compiler: Compiler, + pub target: Interned<String>, + pub mode: Mode, + pub test_kind: TestKind, + pub krate: Interned<String>, } impl Step for Crate { @@ -1518,8 +1519,14 @@ impl Step for Crate { if test_kind.subcommand() == "test" && !builder.fail_fast { cargo.arg("--no-fail-fast"); } - if builder.doc_tests { - cargo.arg("--doc"); + match builder.doc_tests { + DocTests::Only => { + cargo.arg("--doc"); + } + DocTests::No => { + cargo.args(&["--lib", "--bins", "--examples", "--tests", "--benches"]); + } + DocTests::Yes => {} } cargo.arg("-p").arg(krate); |
