Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b51a8ed
test(rustfmt): Verify frontmatter is preserved
epage Aug 8, 2025
e50fed7
add regression test for #145529
lolbinarycat Aug 17, 2025
15a8999
refactor rustdoc::invalid_html_tags tag parser
lolbinarycat Aug 17, 2025
d022089
rustdoc::invalid_html_tags(unclosed comment): fix off by one in span
lolbinarycat Aug 19, 2025
10fde9e
Implement some more checks for `ptr_guaranteed_cmp` in consteval:
zachs18 Jul 28, 2025
25afbbc
Remove arm::t32-specific function pointer test.
zachs18 Aug 24, 2025
5d41f7c
Fix some minor issues in comments
houpo-bob Aug 24, 2025
46a7d28
Handle unwinding fatal errors in codegen workers
bjorn3 Aug 24, 2025
525c6a3
Directly raise fatal errors inside the codegen backends
bjorn3 Aug 24, 2025
9567812
compiletest: if a compiler fails outside a ui test, show its output
lolbinarycat Aug 24, 2025
a3229e4
Make `x test distcheck` more self-contained
Kobzol Aug 25, 2025
89f9cf3
Handle tarballs in `x test tidy`
Kobzol Aug 25, 2025
8fa5fc6
Do not forward CI configure arguments to `distcheck` builds
Kobzol Aug 25, 2025
2ea8621
Override `GITHUB_ACTIONS=0` for tidy tests
Kobzol Aug 25, 2025
d262463
Don't show warnings from xcrun with -Zverbose-internals
madsmtm Aug 25, 2025
cce9479
Wait for DPkg frontend lock when trying to remove packages
jieyouxu Aug 24, 2025
f43c6f9
Update books
rustbot Aug 25, 2025
85b5ec9
Update wasm-component-ld dependency
alexcrichton Aug 25, 2025
64cbe52
Allow linking a prebuilt optimized compiler-rt builtins library
pmur Jun 24, 2025
148a07c
Refactor *.optimized-compiler-builtins bootstrap options
pmur Aug 20, 2025
2741508
Rollup merge of #143689 - pmur:murp/external-rt-optimized-compiler-bu…
Zalathar Aug 26, 2025
e011dd4
Rollup merge of #144885 - zachs18:ptr_guaranteed_cmp_more, r=RalfJung
Zalathar Aug 26, 2025
aecc028
Rollup merge of #145535 - lolbinarycat:rustdoc-invalid_html_tags-svg-…
Zalathar Aug 26, 2025
514d612
Rollup merge of #145766 - epage:rustfmt, r=calebcartwright
Zalathar Aug 26, 2025
67436ea
Rollup merge of #145811 - houpo-bob:master, r=samueltardieu
Zalathar Aug 26, 2025
f563309
Rollup merge of #145814 - bjorn3:codegen_worker_fatal_error, r=petroc…
Zalathar Aug 26, 2025
6c310ba
Rollup merge of #145815 - jieyouxu:pr-check-timeout, r=marcoieni
Zalathar Aug 26, 2025
cf0df73
Rollup merge of #145821 - lolbinarycat:compiletest-error-show, r=club…
Zalathar Aug 26, 2025
d196639
Rollup merge of #145845 - Kobzol:fix-distcheck, r=jieyouxu
Zalathar Aug 26, 2025
820bb7f
Rollup merge of #145847 - madsmtm:no-xcrun-warnings, r=jieyouxu
Zalathar Aug 26, 2025
05b34e8
Rollup merge of #145856 - rustbot:docs-update, r=ehuss
Zalathar Aug 26, 2025
a21c2a6
Rollup merge of #145858 - alexcrichton:update-wasm-component-ld, r=lqd
Zalathar Aug 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make x test distcheck more self-contained
  • Loading branch information
Kobzol committed Aug 25, 2025
commit a3229e4101abeb53d96527d0042cf4b5673fc158
39 changes: 21 additions & 18 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3117,53 +3117,56 @@ impl Step for Distcheck {
///
/// FIXME(#136822): dist components are under-tested.
fn run(self, builder: &Builder<'_>) {
builder.info("Distcheck");
let dir = builder.tempdir().join("distcheck");
let _ = fs::remove_dir_all(&dir);
t!(fs::create_dir_all(&dir));
// Use a temporary directory completely outside the current checkout, to avoid reusing any
// local source code, built artifacts or configuration by accident
let root_dir = std::env::temp_dir().join("distcheck");

// Guarantee that these are built before we begin running.
builder.ensure(dist::PlainSourceTarball);
builder.ensure(dist::Src);
// Check that we can build some basic things from the plain source tarball
builder.info("Distcheck plain source tarball");
let plain_src_tarball = builder.ensure(dist::PlainSourceTarball);
let plain_src_dir = root_dir.join("distcheck-plain-src");
builder.clear_dir(&plain_src_dir);

command("tar")
.arg("-xf")
.arg(builder.ensure(dist::PlainSourceTarball).tarball())
.arg(plain_src_tarball.tarball())
.arg("--strip-components=1")
.current_dir(&dir)
.current_dir(&plain_src_dir)
.run(builder);
command("./configure")
.arg("--set")
.arg("rust.omit-git-hash=false")
.args(&builder.config.configure_args)
.arg("--enable-vendor")
.current_dir(&dir)
.current_dir(&plain_src_dir)
.run(builder);
command(helpers::make(&builder.config.host_target.triple))
.arg("check")
.current_dir(&dir)
.current_dir(&plain_src_dir)
.run(builder);

// Now make sure that rust-src has all of libstd's dependencies
builder.info("Distcheck rust-src");
let dir = builder.tempdir().join("distcheck-src");
let _ = fs::remove_dir_all(&dir);
t!(fs::create_dir_all(&dir));
let src_tarball = builder.ensure(dist::Src);
let src_dir = root_dir.join("distcheck-src");
builder.clear_dir(&src_dir);

command("tar")
.arg("-xf")
.arg(builder.ensure(dist::Src).tarball())
.arg(src_tarball.tarball())
.arg("--strip-components=1")
.current_dir(&dir)
.current_dir(&src_dir)
.run(builder);

let toml = dir.join("rust-src/lib/rustlib/src/rust/library/std/Cargo.toml");
let toml = src_dir.join("rust-src/lib/rustlib/src/rust/library/std/Cargo.toml");
command(&builder.initial_cargo)
// Will read the libstd Cargo.toml
// which uses the unstable `public-dependency` feature.
.env("RUSTC_BOOTSTRAP", "1")
.arg("generate-lockfile")
.arg("--manifest-path")
.arg(&toml)
.current_dir(&dir)
.current_dir(&src_dir)
.run(builder);
}
}
Expand Down
14 changes: 14 additions & 0 deletions src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1950,6 +1950,20 @@ impl Build {
t!(fs::remove_dir_all(dir))
}

/// Make sure that `dir` will be an empty existing directory after this function ends.
/// If it existed before, it will be first deleted.
fn clear_dir(&self, dir: &Path) {
if self.config.dry_run() {
return;
}

#[cfg(feature = "tracing")]
let _span = trace_io!("dir-clear", ?dir);

let _ = std::fs::remove_dir_all(dir);
self.create_dir(dir);
}

fn read_dir(&self, dir: &Path) -> impl Iterator<Item = fs::DirEntry> {
let iter = match fs::read_dir(dir) {
Ok(v) => v,
Expand Down
7 changes: 1 addition & 6 deletions src/ci/docker/host-x86_64/x86_64-gnu-distcheck/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh

# We are disabling CI LLVM since distcheck is an offline build.
ENV NO_DOWNLOAD_CI_LLVM 1

ENV RUST_CONFIGURE_ARGS --build=x86_64-unknown-linux-gnu --set rust.omit-git-hash=false
ENV SCRIPT python3 ../x.py --stage 2 test distcheck
ENV DIST_SRC 1
ENV SCRIPT python3 ../x.py test distcheck