summaryrefslogtreecommitdiff
path: root/testsuite/driver/testlib.py
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-11-16 10:08:39 -0500
committerBen Gamari <ben@smart-cactus.org>2019-11-17 09:46:00 -0500
commit29df661737ffa0c8efa619adea8ea81003382be9 (patch)
treec6ea4d165313657fbedbb214a89b366ad92ea878 /testsuite/driver/testlib.py
parentb88445d3070d492baf770d8cf6b64038ce65eec3 (diff)
downloadhaskell-wip/fix-windows-again.tar.gz
testsuite: Work around #17483wip/fix-windows-again
msys2 Python's wrapper for stat (called by Path.exists()) appears to fail randomly with errno=0. Work around this by retrying 10 times in the event that this happens.
Diffstat (limited to 'testsuite/driver/testlib.py')
-rw-r--r--testsuite/driver/testlib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 79d504a845..849996d5f4 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -14,7 +14,8 @@ import copy
import glob
import sys
from math import ceil, trunc
-from pathlib import Path, PurePath
+from pathlib import PurePath
+from testutil import Path
import collections
import subprocess
@@ -39,6 +40,7 @@ if config.use_threads:
global wantToStop
wantToStop = False
+
# I have no idea what the type of this is
global thisdir_settings
thisdir_settings = None # type: ignore