Skip to content

Commit 92c98a0

Browse files
committed
keep src/tgt seeds
1 parent 8cfe742 commit 92c98a0

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

fuzz.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,17 @@ def check(recipe_arg, time_budget):
179179
if final_res:
180180
# only keep at most 5 file
181181
cnt = 5
182+
kept_files = []
182183
for file in os.listdir(work_dir):
183184
if file.startswith(recipe):
184-
cnt -= 1
185-
if cnt < 0:
186-
os.remove(os.path.join(work_dir, file))
185+
name = file.split('.')[0]
186+
if name in kept_files:
187+
continue
188+
cnt -= 1
189+
if cnt >= 0:
190+
kept_files.append(name)
191+
else:
192+
os.remove(os.path.join(work_dir, file))
187193
return True
188194
idx += files_per_iter
189195
return False

0 commit comments

Comments
 (0)