From bb9062a2967a5b772788aa14f742d8927ac040ba Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 29 Apr 2016 14:23:15 -0700 Subject: rustbuild: Add support for crate tests + doctests This commit adds support to rustbuild to run crate unit tests (those defined by `#[test]`) as well as documentation tests. All tests are powered by `cargo test` under the hood. Each step requires the `libtest` library is built for that corresponding stage. Ideally the `test` crate would be a dev-dependency, but for now it's just easier to ensure that we sequence everything in the right order. Currently no filtering is implemented, so there's not actually a method of testing *only* libstd or *only* libcore, but rather entire swaths of crates are tested all at once. A few points of note here are: * The `coretest` and `collectionstest` crates are just listed as `[[test]]` entires for `cargo test` to naturally pick up. This mean that `cargo test -p core` actually runs all the tests for libcore. * Libraries that aren't tested all mention `test = false` in their `Cargo.toml` * Crates aren't currently allowed to have dev-dependencies due to rust-lang/cargo#860, but we can likely alleviate this restriction once workspaces are implemented. cc #31590 --- src/liballoc/Cargo.toml | 1 - 1 file changed, 1 deletion(-) (limited to 'src/liballoc') diff --git a/src/liballoc/Cargo.toml b/src/liballoc/Cargo.toml index 5da0f1a10b9..0889ca9fc84 100644 --- a/src/liballoc/Cargo.toml +++ b/src/liballoc/Cargo.toml @@ -6,7 +6,6 @@ version = "0.0.0" [lib] name = "alloc" path = "lib.rs" -test = false [dependencies] core = { path = "../libcore" } -- cgit 1.4.1-3-g733a5