diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-01-20 22:36:22 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-01-27 08:32:12 -0500 |
commit | 236beacaeddd19d03af61cfbb3d8a3850e97b3e7 (patch) | |
tree | fae3e46c5ddf9e4cc2faacef5aa071a2153548f4 /testsuite/driver/testlib.py | |
parent | fc44e0b205c71abe3ac615ad3b2a292b37d7fc34 (diff) | |
download | haskell-236beacaeddd19d03af61cfbb3d8a3850e97b3e7.tar.gz |
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.
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r-- | testsuite/driver/testlib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index ba4f6a5a47..4a87f0a117 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -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: |