From 8e08c4d88b63baca2bc92011f9b4c31f7aec5198 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 11 Oct 2023 00:26:48 +0200 Subject: [PATCH] gh-110313: regrtest: don't remove files created by PGO build --- Lib/test/libregrtest/save_env.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/test/libregrtest/save_env.py b/Lib/test/libregrtest/save_env.py index b2cc381344b2ef..71b5a533b605a1 100644 --- a/Lib/test/libregrtest/save_env.py +++ b/Lib/test/libregrtest/save_env.py @@ -297,6 +297,11 @@ def resource_info(self): method_suffix = name.replace('.', '_') get_name = 'get_' + method_suffix restore_name = 'restore_' + method_suffix + if self.pgo and method_suffix == 'files': + # gh-110313: Running PROFILE_TASK of make creates profile files + # like "code-4262.profclangr" in the current directory on + # purpose. They must not be removed. + continue yield name, getattr(self, get_name), getattr(self, restore_name) def __enter__(self):