Skip to content

Commit b51c7b7

Browse files
committed
Add a test that all perf-config.json files can be loaded
1 parent 1858715 commit b51c7b7

File tree

1 file changed

+21
-0
lines changed
  • collector/src/compile/benchmark

1 file changed

+21
-0
lines changed

collector/src/compile/benchmark/mod.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,3 +514,24 @@ fn substring_matches(
514514
}
515515
false
516516
}
517+
518+
#[cfg(test)]
519+
mod tests {
520+
use crate::compile::benchmark::get_compile_benchmarks;
521+
use std::path::Path;
522+
523+
#[test]
524+
fn check_compile_benchmarks() {
525+
// Check that we can deserialize all perf-config.json files in the compile benchmark
526+
// directory.
527+
let root = env!("CARGO_MANIFEST_DIR");
528+
let benchmarks = get_compile_benchmarks(
529+
&Path::new(root).join("compile-benchmarks"),
530+
None,
531+
None,
532+
None,
533+
)
534+
.unwrap();
535+
assert!(benchmarks.len() > 0);
536+
}
537+
}

0 commit comments

Comments
 (0)