Rollup merge of #41608 - cuviper:distcheck-rust-src, r=alexcrichton
Add a distcheck for rust-src completeness This is for the last commit of #41546. For some reason, @bors only saw the first two commits, and wouldn't approve the last even when explicitly directed so. r? @alexcrichton
This commit is contained in:
commit
b14694071c
@ -577,6 +577,7 @@ pub fn distcheck(build: &Build) {
|
||||
return
|
||||
}
|
||||
|
||||
println!("Distcheck");
|
||||
let dir = build.out.join("tmp").join("distcheck");
|
||||
let _ = fs::remove_dir_all(&dir);
|
||||
t!(fs::create_dir_all(&dir));
|
||||
@ -594,6 +595,26 @@ pub fn distcheck(build: &Build) {
|
||||
build.run(Command::new(build_helper::make(&build.config.build))
|
||||
.arg("check")
|
||||
.current_dir(&dir));
|
||||
|
||||
// Now make sure that rust-src has all of libstd's dependencies
|
||||
println!("Distcheck rust-src");
|
||||
let dir = build.out.join("tmp").join("distcheck-src");
|
||||
let _ = fs::remove_dir_all(&dir);
|
||||
t!(fs::create_dir_all(&dir));
|
||||
|
||||
let mut cmd = Command::new("tar");
|
||||
cmd.arg("-xzf")
|
||||
.arg(dist::rust_src_installer(build))
|
||||
.arg("--strip-components=1")
|
||||
.current_dir(&dir);
|
||||
build.run(&mut cmd);
|
||||
|
||||
let toml = dir.join("rust-src/lib/rustlib/src/rust/src/libstd/Cargo.toml");
|
||||
build.run(Command::new(&build.cargo)
|
||||
.arg("generate-lockfile")
|
||||
.arg("--manifest-path")
|
||||
.arg(&toml)
|
||||
.current_dir(&dir));
|
||||
}
|
||||
|
||||
/// Test the build system itself
|
||||
|
@ -315,11 +315,18 @@ pub fn std(build: &Build, compiler: &Compiler, target: &str) {
|
||||
t!(fs::remove_dir_all(&image));
|
||||
}
|
||||
|
||||
/// The path to the complete rustc-src tarball
|
||||
pub fn rust_src_location(build: &Build) -> PathBuf {
|
||||
let plain_name = format!("rustc-{}-src", build.rust_package_vers());
|
||||
distdir(build).join(&format!("{}.tar.gz", plain_name))
|
||||
}
|
||||
|
||||
/// The path to the rust-src component installer
|
||||
pub fn rust_src_installer(build: &Build) -> PathBuf {
|
||||
let name = pkgname(build, "rust-src");
|
||||
distdir(build).join(&format!("{}.tar.gz", name))
|
||||
}
|
||||
|
||||
/// Creates a tarball of save-analysis metadata, if available.
|
||||
pub fn analysis(build: &Build, compiler: &Compiler, target: &str) {
|
||||
assert!(build.config.extended);
|
||||
|
Loading…
x
Reference in New Issue
Block a user