8 Commits

Author SHA1 Message Date
Alex Crichton
bc5c441b12 Change how standard_lib tests work
* Minimize the sysroot crates in play
* Don't use build scripts to inject args
* Use `RUSTC_WRAPPER` to dynamically switch `--sysroot` depending on
  whether we're building sysroot crates or not.
* Minimize dependency graph in sysroot, only have each crate depend on a
  dummy crates.io crate for testing and otherwise don't depend on
  anything to load the desired sysroot crate directly.
2019-09-23 18:53:28 -07:00
Alex Crichton
0dd79670d4 Add back a full integration test for -Zbuild-std
Only run these tests on one CI builder (not all platforms) though. This
is extremely resource intensive since it rebuilds libstd. Currently this
does not share a build directly like before because the number of tests
are supposed to be small, but if necessary we can add that in later too.
2019-09-16 11:47:09 -07:00
Alex Crichton
9115b2c326 Extract support directory to its own crate
Extract out all our test support code to its own standalone crate so it
can be shared between multiple test suites if necessary.
2019-09-16 11:47:09 -07:00
Alex Crichton
4cbfd02eff Improve test suite for -Zbuild-std
This commit is aimed directly at rust-lang/wg-cargo-std-aware#33 and in
general making the `-Zbuild-std` tests more robust. The main change here
is that a new source tree is checked in, `tests/testsuite/mock-std`,
which mirrors rust-lang/rust's own tree for libstd. This mock tree is as
empty as it can be, ideally duplicating almost nothing but for not
requiring duplication of Cargo metadata about patches and such.

The end result here looks like:

* All `-Zbuild-std` tests are now run in parallel
* All tests run much more quickly since they're compiling tiny crates
  instead of actually compiling libstd/libcore
* No tests require network access
* We verify that crates have access to the "custom" libraries
  that we build

Coverage of tests is not currently expanded, but it's hoped that we
could add that shortly afterwards. Coverage has actually gone down
slightly since the custom target test was commented out temporarily and
the full integration test of running `-Zbuild-std` isn't run on CI any
more.

Closes rust-lang/wg-cargo-std-aware#33
2019-09-16 11:46:46 -07:00
Philipp Oppermann
6b4fd44ea6 Add a test for -Zbuild-std with custom test frameworks 2019-09-15 17:54:35 +02:00
Alex Crichton
2ed112c14e Add alloc and proc_macro to libstd crates
These two have been stabilized for all targets like `std` so if `std` is
requested let's be sure to make them available to other crates as well.
2019-09-06 13:49:48 -07:00
Eric Huss
aee4048229 Remove bin_nostd test, it will likely to finicky. 2019-09-03 13:53:59 -07:00
Eric Huss
1f14fa3172 Basic standard library support. 2019-09-03 13:53:59 -07:00