Change edit dumps format and add indexes for all corpus tests
The new dumped edits format is `edit.<SEED>.<TEST_INDEX>.<SEED_INDEX>.<TEST_NAME>`
To cleanup edits:
- Instead of the standard:
> rm target/scratch/edit.*
- Use the following shell command:
> find target/scratch/ -name 'edit.*' -delete
This commit is contained in:
parent
caaa533b8d
commit
6616d7deeb
1 changed files with 11 additions and 4 deletions
|
|
@ -111,8 +111,10 @@ fn test_language_corpus(start_seed: usize, language_name: &str) {
|
|||
}
|
||||
|
||||
println!();
|
||||
for test in tests {
|
||||
println!(" {} example - {}", language_name, test.name);
|
||||
for (test_index, test) in tests.iter().enumerate() {
|
||||
let test_name = format!("{language_name} example - {}", test.name);
|
||||
|
||||
println!(" {test_index}. {test_name}");
|
||||
|
||||
let passed = allocations::record(|| {
|
||||
let mut log_session = None;
|
||||
|
|
@ -173,11 +175,16 @@ fn test_language_corpus(start_seed: usize, language_name: &str) {
|
|||
}
|
||||
|
||||
if log_seed {
|
||||
println!(" seed: {}", seed);
|
||||
println!(" {test_index}.{trial:<2} seed: {}", seed);
|
||||
}
|
||||
|
||||
if dump_edits {
|
||||
fs::write(SCRATCH_BASE_DIR.join(format!("{seed}.edit")), &input).unwrap();
|
||||
fs::write(
|
||||
SCRATCH_BASE_DIR
|
||||
.join(format!("edit.{seed}.{test_index}.{trial} {test_name}")),
|
||||
&input,
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
if *LOG_GRAPH_ENABLED {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue