testsuite: Work around #12554

Authored by bgamari on Oct 15 2016, 1:27 PM.


Trac Issues

It seems that Python 2.7.11 and "recent" msys2 releases are broken,
holding open file locks unexpected. This causes rmtree to intermittently
fail. Even worse, it would fail silently (since we pass
ignore_errors=True), causing makedirs to fail later.

We now explicitly check for the existence of the test directory before
attempting to delete it and disable ignore_errors. Moreover, on Windows
we now try multiple times to rmtree the testdir, working around the
apparently msys bug.

This is all just terrible, but Phyx and I spent several hours trying to
track down the issue to no available. The workaround is better than

Test Plan

Validate on Windows and Linux

bgamari updated this revision to Diff 9015.Oct 15 2016, 1:27 PM
bgamari retitled this revision from to testsuite: Work around #12554.
bgamari updated this object.
bgamari edited the test plan for this revision. (Show Details)
bgamari added a reviewer: Phyx.
bgamari updated the Trac tickets for this revision.
Phyx accepted this revision.Oct 15 2016, 1:30 PM
Phyx edited edge metadata.

I'll ask around to see if anyone else has this issue and see if we can't identity the problem and patch it upstream.
But for now, this is indeed a lot better than nothing.


This revision is now accepted and ready to land.Oct 15 2016, 1:30 PM
bgamari planned changes to this revision.Oct 15 2016, 4:00 PM

It seems that even this isn't sufficient. I did a three test runs on Windows and all of them had at least one failure.

bgamari abandoned this revision.Oct 17 2016, 9:19 AM

I think we have a temporary workaround; abandoning this.