about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorAhmed Charles <acharles@outlook.com>2016-09-02 01:55:29 -0700
committerAlex Crichton <alex@alexcrichton.com>2016-10-07 12:04:32 -0700
commit9ca382f95fff732f6cd2a6cffbd04825ff6c4145 (patch)
tree2c8244041196c6f857035c23086af4e6f0c51df3 /src/bootstrap
parentca76c7e0148f87876dbf8ad1f7dd13fb9f268481 (diff)
downloadrust-9ca382f95fff732f6cd2a6cffbd04825ff6c4145.tar.gz
rust-9ca382f95fff732f6cd2a6cffbd04825ff6c4145.zip
Use workspaces and switch to a single Cargo.lock.
This involves hacking the code used to run cargo test on various
packages, because it reads Cargo.lock to determine which packages should
be tested. This change implements a blacklist, since that will catch new
crates when they are added in the future.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/Cargo.lock180
-rw-r--r--src/bootstrap/check.rs52
2 files changed, 43 insertions, 189 deletions
diff --git a/src/bootstrap/Cargo.lock b/src/bootstrap/Cargo.lock
deleted file mode 100644
index babbb6a16ba..00000000000
--- a/src/bootstrap/Cargo.lock
+++ /dev/null
@@ -1,180 +0,0 @@
-[root]
-name = "bootstrap"
-version = "0.0.0"
-dependencies = [
- "build_helper 0.1.0",
- "cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
- "filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
- "gcc 0.3.35 (git+https://github.com/alexcrichton/gcc-rs)",
- "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
- "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
- "md5 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)",
- "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
- "toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "aho-corasick"
-version = "0.5.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "build_helper"
-version = "0.1.0"
-
-[[package]]
-name = "cmake"
-version = "0.1.17"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "filetime"
-version = "0.1.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "gcc"
-version = "0.3.35"
-source = "git+https://github.com/alexcrichton/gcc-rs#8ff5360b6e0dc4f3c9d3f71036f1ff403c68469d"
-
-[[package]]
-name = "gcc"
-version = "0.3.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
-name = "getopts"
-version = "0.2.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
-name = "kernel32-sys"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
- "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "libc"
-version = "0.2.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
-name = "md5"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
-name = "memchr"
-version = "0.1.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "num_cpus"
-version = "0.2.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "regex"
-version = "0.1.73"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "aho-corasick 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)",
- "regex-syntax 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "thread_local 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
- "utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.3.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
-name = "rustc-serialize"
-version = "0.3.19"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
-name = "thread-id"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "thread_local"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "toml"
-version = "0.1.30"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
-name = "utf8-ranges"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
-name = "winapi"
-version = "0.2.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[[package]]
-name = "winapi-build"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-
-[metadata]
-"checksum aho-corasick 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2b3fb52b09c1710b961acb35390d514be82e4ac96a9969a8e38565a29b878dc9"
-"checksum cmake 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "dfcf5bcece56ef953b8ea042509e9dcbdfe97820b7e20d86beb53df30ed94978"
-"checksum filetime 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "5363ab8e4139b8568a6237db5248646e5a8a2f89bd5ccb02092182b11fd3e922"
-"checksum gcc 0.3.35 (git+https://github.com/alexcrichton/gcc-rs)" = "<none>"
-"checksum gcc 0.3.35 (registry+https://github.com/rust-lang/crates.io-index)" = "91ecd03771effb0c968fd6950b37e89476a578aaf1c70297d8e92b6516ec3312"
-"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
-"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
-"checksum libc 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "23e3757828fa702a20072c37ff47938e9dd331b92fac6e223d26d4b7a55f7ee2"
-"checksum md5 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a5539a8dee9b4ae308c9c406a379838b435a8f2c84cf9fedc6d5a576be9888db"
-"checksum memchr 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d8b629fb514376c675b98c1421e80b151d3817ac42d7c667717d282761418d20"
-"checksum num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "cee7e88156f3f9e19bdd598f8d6c9db7bf4078f99f8381f43a55b09648d1a6e3"
-"checksum regex 0.1.73 (registry+https://github.com/rust-lang/crates.io-index)" = "56b7ee9f764ecf412c6e2fff779bca4b22980517ae335a21aeaf4e32625a5df2"
-"checksum regex-syntax 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "31040aad7470ad9d8c46302dcffba337bb4289ca5da2e3cd6e37b64109a85199"
-"checksum rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "6159e4e6e559c81bd706afe9c8fd68f547d3e851ce12e76b1de7914bab61691b"
-"checksum thread-id 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9539db560102d1cef46b8b78ce737ff0bb64e7e18d35b2a5688f7d097d0ff03"
-"checksum thread_local 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "55dd963dbaeadc08aa7266bf7f91c3154a7805e32bb94b820b769d2ef3b4744d"
-"checksum toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)" = "0590d72182e50e879c4da3b11c6488dae18fccb1ae0c7a3eda18e16795844796"
-"checksum utf8-ranges 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1ca13c08c41c9c3e04224ed9ff80461d97e121589ff27c753a16cb10830ae0f"
-"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
-"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index b8417218a22..8d160a99352 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -268,10 +268,47 @@ pub fn krate(build: &Build,
              compiler: &Compiler,
              target: &str,
              mode: Mode) {
-    let (name, path, features) = match mode {
-        Mode::Libstd => ("libstd", "src/rustc/std_shim", build.std_features()),
-        Mode::Libtest => ("libtest", "src/rustc/test_shim", String::new()),
-        Mode::Librustc => ("librustc", "src/rustc", build.rustc_features()),
+    let (name, path, features, excluded) = match mode {
+        Mode::Libstd => {
+            let excluded = vec![
+               "alloc_jemalloc", "arena", "bootstrap", "cargotest", "compiletest",
+               "error_index_generator", "flate", "fmt_macros", "getopts", "graphviz",
+               "linkchecker", "log", "proc_macro", "rbml", "rustbook", "rustc", "rustc-main",
+               "rustc_back", "rustc_bitflags", "rustc_borrowck", "rustc_const_eval",
+               "rustc_const_math", "rustc_data_structures", "rustc_driver", "rustc_errors",
+               "rustc_incremental", "rustc_lint", "rustc_llvm", "rustc_metadata", "rustc_mir",
+               "rustc_passes", "rustc_platform_intrinsics", "rustc_plugin", "rustc_privacy",
+               "rustc_resolve", "rustc_save_analysis", "rustc_trans", "rustc_typeck", "rustdoc",
+               "serialize", "syntax", "syntax_ext", "syntax_pos", "term", "test", "test_shim",
+               "tidy", "unwind",
+            ];
+            ("libstd", "src/rustc/std_shim", build.std_features(), excluded)
+        }
+        Mode::Libtest => {
+            let excluded = vec![
+                "alloc", "alloc_jemalloc", "alloc_system", "arena", "bootstrap", "build_helper",
+                "cargotest", "collections", "compiletest", "core", "error_index_generator",
+                "flate", "fmt_macros", "graphviz", "libc", "linkchecker", "log", "panic_abort",
+                "panic_unwind", "proc_macro", "rand", "rbml", "rustbook", "rustc", "rustc-main",
+                "rustc_back", "rustc_bitflags", "rustc_borrowck", "rustc_const_eval",
+                "rustc_const_math", "rustc_data_structures", "rustc_driver", "rustc_errors",
+                "rustc_incremental", "rustc_lint", "rustc_llvm", "rustc_metadata", "rustc_mir",
+                "rustc_passes", "rustc_platform_intrinsics", "rustc_plugin", "rustc_privacy",
+                "rustc_resolve", "rustc_save_analysis", "rustc_trans", "rustc_typeck",
+                "rustc_unicode", "rustdoc", "serialize", "std", "std_shim", "syntax", "syntax_ext",
+                "syntax_pos", "tidy", "unwind",
+            ];
+            ("libtest", "src/rustc/test_shim", String::new(), excluded)
+        }
+        Mode::Librustc => {
+            let excluded = vec![
+                "alloc", "alloc_jemalloc", "alloc_system", "bootstrap", "cargotest", "collections",
+                "compiletest", "core", "error_index_generator", "getopts", "libc", "linkchecker",
+                "panic_abort", "panic_unwind", "rand", "rustbook", "rustc_unicode", "std",
+                "std_shim", "term", "test", "test_shim", "tidy", "unwind",
+            ];
+            ("librustc", "src/rustc", build.rustc_features(), excluded)
+        }
         _ => panic!("can only test libraries"),
     };
     println!("Testing {} stage{} ({} -> {})", name, compiler.stage,
@@ -285,7 +322,7 @@ pub fn krate(build: &Build,
 
     // Generate a list of `-p` arguments to pass to the `cargo test` invocation
     // by crawling the corresponding Cargo.lock file.
-    let lockfile = build.src.join(path).join("Cargo.lock");
+    let lockfile = build.src.join("src").join("Cargo.lock");
     let mut contents = String::new();
     t!(t!(File::open(&lockfile)).read_to_string(&mut contents));
     let mut lines = contents.lines();
@@ -305,10 +342,7 @@ pub fn krate(build: &Build,
 
         let crate_name = &line[prefix.len()..line.len() - 1];
 
-        // Right now jemalloc is our only target-specific crate in the sense
-        // that it's not present on all platforms. Custom skip it here for now,
-        // but if we add more this probably wants to get more generalized.
-        if crate_name.contains("jemalloc") {
+        if excluded.contains(&crate_name) {
             continue
         }