Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustbuild: Add support for crate tests + doctests #33282

Merged
merged 2 commits into from
May 13, 2016

Commits on May 11, 2016

  1. rustbuild: Tighten dependencies of build scripts

    Ensure that `rerun-if-changed` is printed for all build scripts to ensure that
    they've all got the right list of dependencies.
    alexcrichton committed May 11, 2016
    Configuration menu
    Copy the full SHA
    8d65591 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2016

  1. 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 rust-lang#31590
    alexcrichton committed May 12, 2016
    Configuration menu
    Copy the full SHA
    bb9062a View commit details
    Browse the repository at this point in the history