[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.
This commit is contained in:
Christophe Monniez 2020-01-21 17:13:52 +01:00 committed by XavierDo
parent 5d1772a9a5
commit e4e2634de1

View File

@ -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')