All examples pass with cargo xtask --target all

This commit is contained in:
Emil Fresk 2023-01-08 19:56:47 +01:00 committed by Henrik Tjäder
parent ceaf3613d3
commit 35c97b61c1
13 changed files with 28 additions and 21 deletions

View file

@ -87,12 +87,14 @@ fn main() -> anyhow::Result<()> {
let targets = [ARMV7M, ARMV6M];
let examples: Vec<_> = std::fs::read_dir("./examples")?
.filter_map(|path| {
path.map(|p| p.path().file_stem().unwrap().to_str().unwrap().to_string())
.ok()
})
.filter_map(|p| p.ok())
.map(|p| p.path())
.filter(|p| p.display().to_string().ends_with(".rs"))
.map(|path| path.file_stem().unwrap().to_str().unwrap().to_string())
.collect();
println!("examples: {examples:?}");
let opts = Options::from_args();
let target = &opts.target;