Commit 236beaca authored by Ben Gamari's avatar Ben Gamari 🐢

testsuite: Remove directories that already exist when seeding extra_files

Otherwise the testsuite driver crashes when run multiple times with CLEANUP=NO
on a test containing such extra_files.
parent fc44e0b2
......@@ -882,6 +882,8 @@ def do_test(name, way, func, args, files):
if os.path.isfile(src):
link_or_copy_file(src, dst)
elif os.path.isdir(src):
if os.path.exists(dst):
shutil.rmtree(dst)
os.mkdir(dst)
lndir(src, dst)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment