Skip to content

Commit

Permalink
[generate] Revert f0d9d90 and replace with adding target to `known_fi…
Browse files Browse the repository at this point in the history
…les` when we want to keep visualizer output
  • Loading branch information
mpsijm committed Jul 17, 2024
1 parent f85a5bc commit 67eb0ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,8 @@ def copy_generated():
# When running with --no-visualizer and .in/.ans files did not change,
# do not remove output of visualizer.
# This is useful for when a user/CI has a clean cache (e.g. after a reboot).
# Also add target to known_files, so the cleanup step does not remove it.
generator_config.known_files.add(target)
continue
# Target exists but source wasn't generated -> remove it
generator_config.remove(target)
Expand Down Expand Up @@ -1809,8 +1811,6 @@ def _remove_unknown(self, path, bar, silent=False):
path.is_dir() and local in self.known_directories,
not path.is_dir() and path in self.known_files,
not path.is_dir() and not self.process_testcase(local),
# Do not remove output of visualizer when running with --no-visualizer
config.args.no_visualizer and path.suffix in config.KNOWN_VISUALIZER_EXTENSIONS,
)
)
if keep:
Expand Down

0 comments on commit 67eb0ee

Please sign in to comment.