summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-05-27 14:47:47 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-06-01 06:38:26 -0400
commit15857ad856b6072d2c6a34b2bf7aa7316d7e2b12 (patch)
treec2170043ef2a4c0072c8dbe49daddf550c025d2e
parent5aaf08f25ef0629432c792880dfc6785ff3ec8a3 (diff)
downloadhaskell-15857ad856b6072d2c6a34b2bf7aa7316d7e2b12.tar.gz
testsuite: Don't fail if we can't unlink __symlink_test
Afterall, it's possible we were unable to create it due to lack of symlink permission.
-rw-r--r--testsuite/driver/testutil.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/testsuite/driver/testutil.py b/testsuite/driver/testutil.py
index a5b20dfa97..34d78cda99 100644
--- a/testsuite/driver/testutil.py
+++ b/testsuite/driver/testutil.py
@@ -98,7 +98,10 @@ def symlinks_work() -> bool:
except OSError as e:
print('Saw {} during symlink test; assuming symlinks do not work.'.format(e))
finally:
- os.unlink('__symlink-test')
+ try:
+ os.unlink('__symlink-test')
+ except:
+ pass
return works
else: