Skip to content

Commit 2ecab99

Browse files
GuillaumeGomezantoyo
authored andcommitted
Fix build failure in cfg-if
1 parent bbc765b commit 2ecab99

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build_system/src/test.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,12 +703,16 @@ fn test_projects(env: &Env, args: &TestArg) -> Result<(), String> {
703703
//"https://github.com/rust-lang/cargo", // TODO: very slow, only run on master?
704704
];
705705

706+
let mut env = env.clone();
707+
let rustflags =
708+
format!("{} --cap-lints allow", env.get("RUSTFLAGS").cloned().unwrap_or_default());
709+
env.insert("RUSTFLAGS".to_string(), rustflags);
706710
let run_tests = |projects_path, iter: &mut dyn Iterator<Item = &&str>| -> Result<(), String> {
707711
for project in iter {
708712
let clone_result = git_clone_root_dir(project, projects_path, true)?;
709713
let repo_path = Path::new(&clone_result.repo_dir);
710-
run_cargo_command(&[&"build", &"--release"], Some(repo_path), env, args)?;
711-
run_cargo_command(&[&"test"], Some(repo_path), env, args)?;
714+
run_cargo_command(&[&"build", &"--release"], Some(repo_path), &env, args)?;
715+
run_cargo_command(&[&"test"], Some(repo_path), &env, args)?;
712716
}
713717

714718
Ok(())

0 commit comments

Comments
 (0)