Skip to content

Commit 18e8a63

Browse files
authored
add test for inductor provenance tracking (#103)
as title
1 parent 9387570 commit 18e8a63

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/integration_test.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,29 @@ fn test_export_guard_report() {
240240
);
241241
}
242242
}
243+
244+
#[test]
245+
fn test_provenance_tracking() {
246+
let expected_files = [
247+
"provenance_tracking_-_-_-_-.html",
248+
"-_-_-_-/inductor_provenance_tracking_node_mappings_11.json",
249+
];
250+
// Read the test file
251+
let path = Path::new("tests/inputs/inductor_provenance_aot_cuda_log.txt").to_path_buf();
252+
let config = tlparse::ParseConfig {
253+
inductor_provenance: true,
254+
..Default::default()
255+
};
256+
let output = tlparse::parse_path(&path, config);
257+
assert!(output.is_ok());
258+
let map: HashMap<PathBuf, String> = output.unwrap().into_iter().collect();
259+
println!("{:?}", map.keys());
260+
// Check all files are present
261+
for prefix in expected_files {
262+
assert!(
263+
prefix_exists(&map, prefix),
264+
"{} not found in output",
265+
prefix
266+
);
267+
}
268+
}

0 commit comments

Comments
 (0)