Commit 4d4f3533 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

testsuite: Rip out hack for #12554

@Phyx is working on correctly fixing (pun intended) the underlying issue
that prompted this hack. It turns out that `timeout` it the culprit.
Moreover, this hack breaks on msys python builds, which don't export

Test Plan: Validate on Windows with `msys` python.

Reviewers: Phyx, austin

Subscribers: thomie, Phyx

Differential Revision:

GHC Trac Issues: #12554
parent 20fb781e
......@@ -1850,16 +1850,7 @@ def find_expected_file(name, suff):
return basename
# Windows seems to exhibit a strange behavior where processes' executables
# remain locked even after the process itself has died. When this happens
# rmtree will fail with either Error 5 or Error 32. It takes some time for this
# to resolve so we try several times to delete the directory, only eventually
# failing if things seem really stuck. See #12554.
if config.msys:
from exceptions import WindowsError
import stat
def cleanup():
def on_error(function, path, excinfo):
......@@ -1871,21 +1862,7 @@ if config.msys:
testdir = getTestOpts().testdir
attempts = 0
max_attempts = 10
while attempts < max_attempts and os.path.exists(testdir):
shutil.rmtree(testdir, ignore_errors=False, onerror=on_error)
except WindowsError as e:
#print('failed deleting %s: %s' % (testdir, e))
if e.winerror in [5, 32]:
attempts += 1
if attempts == max_attempts:
raise e
raise e
shutil.rmtree(testdir, ignore_errors=False, onerror=on_error)
def cleanup():
testdir = getTestOpts().testdir
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