Fix rand tests
This commit is contained in:
parent
86a2bb760c
commit
3b4c58d7f5
@ -131,6 +131,30 @@ fn prepare_libcore(
|
||||
)?;
|
||||
}
|
||||
println!("Successfully prepared libcore for building");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
// TODO: remove when we can ignore warnings in rustdoc tests.
|
||||
fn prepare_rand() -> Result<(), String> {
|
||||
// Apply patch for the rand crate.
|
||||
let file_path = "patches/crates/0001-Remove-deny-warnings.patch";
|
||||
let rand_dir = Path::new("build/rand");
|
||||
println!("[GIT] apply `{}`", file_path);
|
||||
let path = Path::new("../..").join(file_path);
|
||||
run_command_with_output(&[&"git", &"apply", &path], Some(rand_dir))?;
|
||||
run_command_with_output(&[&"git", &"add", &"-A"], Some(rand_dir))?;
|
||||
run_command_with_output(
|
||||
&[
|
||||
&"git",
|
||||
&"commit",
|
||||
&"--no-gpg-sign",
|
||||
&"-m",
|
||||
&format!("Patch {}", path.display()),
|
||||
],
|
||||
Some(rand_dir),
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -241,6 +265,8 @@ pub fn run() -> Result<(), String> {
|
||||
for (repo_url, checkout_commit, cb) in to_clone {
|
||||
clone_and_setup(repo_url, checkout_commit, *cb)?;
|
||||
}
|
||||
|
||||
prepare_rand()?;
|
||||
}
|
||||
|
||||
println!("Successfully ran `prepare`");
|
||||
|
24
patches/crates/0001-Remove-deny-warnings.patch
Normal file
24
patches/crates/0001-Remove-deny-warnings.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From f4a31d2c57cdbd578b778ab70eb2a0cfb248652c Mon Sep 17 00:00:00 2001
|
||||
From: Antoni Boucher <bouanto@zoho.com>
|
||||
Date: Tue, 5 Mar 2024 12:39:44 -0500
|
||||
Subject: [PATCH] Remove #[deny(warnings)]
|
||||
|
||||
---
|
||||
src/lib.rs | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib.rs b/src/lib.rs
|
||||
index 8ade2881d5..e26c595e38 100644
|
||||
--- a/src/lib.rs
|
||||
+++ b/src/lib.rs
|
||||
@@ -47,7 +47,6 @@
|
||||
)]
|
||||
#![deny(missing_docs)]
|
||||
#![deny(missing_debug_implementations)]
|
||||
-#![doc(test(attr(allow(unused_variables), deny(warnings))))]
|
||||
#![no_std]
|
||||
#![cfg_attr(feature = "simd_support", feature(stdsimd, portable_simd))]
|
||||
#![cfg_attr(doc_cfg, feature(doc_cfg))]
|
||||
--
|
||||
2.44.0
|
||||
|
Loading…
Reference in New Issue
Block a user