Fix build failure in cfg-if
This commit is contained in:
parent
bbc765b49b
commit
2ecab996f8
@ -703,12 +703,16 @@ fn test_projects(env: &Env, args: &TestArg) -> Result<(), String> {
|
|||||||
//"https://github.com/rust-lang/cargo", // TODO: very slow, only run on master?
|
//"https://github.com/rust-lang/cargo", // TODO: very slow, only run on master?
|
||||||
];
|
];
|
||||||
|
|
||||||
|
let mut env = env.clone();
|
||||||
|
let rustflags =
|
||||||
|
format!("{} --cap-lints allow", env.get("RUSTFLAGS").cloned().unwrap_or_default());
|
||||||
|
env.insert("RUSTFLAGS".to_string(), rustflags);
|
||||||
let run_tests = |projects_path, iter: &mut dyn Iterator<Item = &&str>| -> Result<(), String> {
|
let run_tests = |projects_path, iter: &mut dyn Iterator<Item = &&str>| -> Result<(), String> {
|
||||||
for project in iter {
|
for project in iter {
|
||||||
let clone_result = git_clone_root_dir(project, projects_path, true)?;
|
let clone_result = git_clone_root_dir(project, projects_path, true)?;
|
||||||
let repo_path = Path::new(&clone_result.repo_dir);
|
let repo_path = Path::new(&clone_result.repo_dir);
|
||||||
run_cargo_command(&[&"build", &"--release"], Some(repo_path), env, args)?;
|
run_cargo_command(&[&"build", &"--release"], Some(repo_path), &env, args)?;
|
||||||
run_cargo_command(&[&"test"], Some(repo_path), env, args)?;
|
run_cargo_command(&[&"test"], Some(repo_path), &env, args)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user