allow non-parallel

This commit is contained in:
nora 2023-04-04 15:17:19 +02:00
parent 2b6a1b30e0
commit 17c4323264

View file

@ -42,14 +42,22 @@ fn full_tests() -> Result<()> {
.map(|e| e.map_err(Into::into))
.collect::<Result<Vec<_>>>()?;
children
.into_par_iter()
.map(|child| {
if std::env::var("PARALLEL").as_deref() != Ok("0") {
children
.into_par_iter()
.map(|child| {
let path = child.path();
build(&path).with_context(|| format!("building {:?}", path.file_name().unwrap()))
})
.collect::<Result<Vec<_>>>()?;
} else {
for child in children {
let path = child.path();
build(&path).with_context(|| format!("building {:?}", path.file_name().unwrap()))
})
.collect::<Result<Vec<_>>>()?;
build(&path).with_context(|| format!("building {:?}", path.file_name().unwrap()))?;
}
}
Ok(())
}