From 67eb0ee0410c9cd05164b84bddddf3b203e719f4 Mon Sep 17 00:00:00 2001 From: Maarten Sijm <9739541+mpsijm@users.noreply.github.com> Date: Wed, 17 Jul 2024 09:55:41 +0200 Subject: [PATCH] [generate] Revert f0d9d90a1b3f and replace with adding target to `known_files` when we want to keep visualizer output --- bin/generate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/generate.py b/bin/generate.py index 44a9454d..92c07448 100644 --- a/bin/generate.py +++ b/bin/generate.py @@ -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) @@ -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: