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

Fix x test core when download-rustc is enabled #110701

Merged
merged 2 commits into from
Jun 4, 2023
Merged

Commits on May 31, 2023

  1. Make x test --dry-run less verbose

    Previously, this would print a message for each doctest, which was quite
    verbose:
    ```
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/exploit-mitigations.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/instrument-coverage.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/json.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/linker-plugin-lto.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/lints/groups.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/lints/index.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/lints/levels.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/aarch64-apple-ios-sim.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/aarch64-nintendo-switch-freestanding.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/apple-watchos.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armeb-unknown-linux-gnueabi.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv4t-none-eabi.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv5te-none-eabi.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv6k-nintendo-3ds.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv7-sony-vita-newlibeabihf.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabi.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/armv7-unknown-linux-uclibceabihf.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/esp-idf.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/fuchsia.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/kmc-solid.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/loongarch-linux.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/m68k-unknown-linux-gnu.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/mipsel-sony-psx.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/nto-qnx.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/openbsd.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/openharmony.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/riscv32imac-unknown-xous-elf.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/unknown-uefi.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/wasm64-unknown-unknown.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/x86_64-fortanix-unknown-sgx.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/platform-support/x86_64-unknown-none.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/profile-guided-optimization.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/target-tier-policy.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/targets/custom.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/targets/index.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/tests/index.md
    doc tests for: /home/jyn/src/rust/src/doc/rustc/src/what-is-rustc.md
    ```
    jyn514 committed May 31, 2023
    Configuration menu
    Copy the full SHA
    2f0a266 View commit details
    Browse the repository at this point in the history
  2. Fix x test --stage 2 core when download-rustc is enabled

    This works by building std from source unconditionally instead of downloading it, for library tests only.
    
    This was somewhat complicated because of the following requirements:
    1. Unconditionally downloading libstd breaks `x test std`, because `coretests` requires the std loaded from the sysroot to match the std that's currently being tested.
    2. Unconditionally rebuilding libstd breaks `x test ui-fulldeps librustdoc`, because anything loading `rustc_private` needs to use the same libstd that rustc was built with.
    
    Break the knot by introducing a new `stage2-test-sysroot`, used only for testing `std` itself. This
    holds a freshly compiled std, while `stage2` and `ci-rustc-sysroot` still hold the downloaded std.
    
    This also extends the existing `cp_filtered` in Sysroot to apply to the `rust-std` component, not just the `rustc-dev` component.
    jyn514 committed May 31, 2023
    Configuration menu
    Copy the full SHA
    a80d69a View commit details
    Browse the repository at this point in the history