Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustbuild: Add support for crate tests + doctests #33282
Conversation
This comment has been minimized.
This comment has been minimized.
|
r? @brson |
rust-highfive
assigned
aturon and
brson
and unassigned
aturon
Apr 29, 2016
This comment has been minimized.
This comment has been minimized.
|
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
referenced this pull request
Apr 29, 2016
Closed
Tracking issue for rustbuild, the alternate build system for rustc #31590
brson
reviewed
Apr 29, 2016
| cargo.args(&build.flags.args); | ||
|
|
||
| build.run(&mut cargo); | ||
| } |
This comment has been minimized.
This comment has been minimized.
brson
Apr 29, 2016
Contributor
This is fairly ugly function. Why search the dag like this and run cargo with a bunch of -p flags instead of calling cargo test on every individual crate?
This comment has been minimized.
This comment has been minimized.
alexcrichton
Apr 29, 2016
Author
Member
Running cargo test with a bunch of -p flags gives us the ability to compile all the crate tests in parallel (but run them sequentially). Ideally this'd just be cargo test --all, but unfortunately that's not implemented yet :(
Running cargo test on each individual crate would work, but we'd still have to discover the list of crates somewhere and we unfortunately wouldn't get the same parallelism :(
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Apr 29, 2016
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:rustbuild-crate-tests
branch
from
58902f5
to
4c42905
Apr 29, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Apr 30, 2016
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:rustbuild-crate-tests
branch
from
4c42905
to
7606bfd
Apr 30, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Apr 30, 2016
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:rustbuild-crate-tests
branch
from
7606bfd
to
f5a73cb
May 2, 2016
This comment has been minimized.
This comment has been minimized.
alexcrichton
referenced this pull request
May 2, 2016
Closed
MSVC: Segfaults with opt-level=3 plus unwinding #33352
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
May 3, 2016
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:rustbuild-crate-tests
branch
from
f5a73cb
to
afbcf90
May 11, 2016
alexcrichton
force-pushed the
alexcrichton:rustbuild-crate-tests
branch
2 times, most recently
from
882e878
to
d11e3c1
May 11, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
May 12, 2016
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
force-pushed the
alexcrichton:rustbuild-crate-tests
branch
from
d11e3c1
to
bb9062a
May 12, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
May 12, 2016
eddyb
added a commit
to eddyb/rust
that referenced
this pull request
May 12, 2016
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
May 12, 2016
eddyb
added a commit
to eddyb/rust
that referenced
this pull request
May 12, 2016
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton commentedApr 29, 2016
This commit adds support to rustbuild to run crate unit tests (those defined by
#[test]) as well as documentation tests. All tests are powered bycargo testunder the hood.
Each step requires the
libtestlibrary is built for that corresponding stage.Ideally the
testcrate would be a dev-dependency, but for now it's just easierto 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:
coretestandcollectionstestcrates are just listed as[[test]]entires for
cargo testto naturally pick up. This mean thatcargo test -p coreactually runs all the tests for libcore.test = falsein theirCargo.tomlrust-lang/cargo#860, but we can likely alleviate this restriction once
workspaces are implemented.
cc #31590