From e4e2634de1f283fe6dcaaad1da0e46590acb3c78 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Tue, 21 Jan 2020 17:13:52 +0100 Subject: [PATCH] [FIX] runbot: keep tests directory Since 857821e4 a screenshot can be saved in the build directory under the "tests" subdirectory. Unfortunately, this directory is cleaned in case of local_cleanup. With this commit, the 'tests' subdirectory is kept in place. --- runbot/models/build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot/models/build.py b/runbot/models/build.py index 10237fc2..6867219e 100644 --- a/runbot/models/build.py +++ b/runbot/models/build.py @@ -544,7 +544,7 @@ class runbot_build(models.Model): build_dir = os.path.join(builds_dir, dest) for f in os.listdir(build_dir): path = os.path.join(build_dir, f) - if os.path.isdir(path) and f != 'logs': + if os.path.isdir(path) and f not in ('logs', 'tests'): shutil.rmtree(path) elif f == 'logs': log_path = os.path.join(build_dir, 'logs')