[commit: ghc] master: testsuite: Rip out hack for #12554 (4d4f353)
git at git.haskell.org
git at git.haskell.org
Thu Nov 17 16:04:24 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/4d4f3533e6ec8698f8af30977c81f17eed1f6970/ghc
>---------------------------------------------------------------
commit 4d4f3533e6ec8698f8af30977c81f17eed1f6970
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Wed Nov 16 22:17:26 2016 -0500
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
`WindowsError`.
Test Plan: Validate on Windows with `msys` python.
Reviewers: Phyx, austin
Subscribers: thomie, Phyx
Differential Revision: https://phabricator.haskell.org/D2724
GHC Trac Issues: #12554
>---------------------------------------------------------------
4d4f3533e6ec8698f8af30977c81f17eed1f6970
testsuite/driver/testlib.py | 25 +------------------------
1 file changed, 1 insertion(+), 24 deletions(-)
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 55d209e..7afabaa 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -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:
- try:
- from exceptions import WindowsError
- except:
- pass
import stat
def cleanup():
def on_error(function, path, excinfo):
@@ -1871,21 +1862,7 @@ if config.msys:
os.unlink(path)
testdir = getTestOpts().testdir
- attempts = 0
- max_attempts = 10
- while attempts < max_attempts and os.path.exists(testdir):
- try:
- 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
- else:
- time.sleep(0.1)
- else:
- raise e
+ shutil.rmtree(testdir, ignore_errors=False, onerror=on_error)
else:
def cleanup():
testdir = getTestOpts().testdir
More information about the ghc-commits
mailing list