You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make tests runnable on Windows and add appveyor.yaml (#1593)
* Make waiter cross-platform
Waiter depended on a couple of posix tricks. The first was a clever
use of os.waitpid(-1, 0) to wait for any spawned processes to return.
On Windows, this raises an exception - Windows has no concept of a
process group.
The second was the use of NamedTempFile(). On anything but Windows,
a file can be open for writing and for reading at the same time.
This trick actually isn't necessary the way NamedTempFile is used
here. It exposes a file-like object pointing to a file already opened
in binary mode. All we have to do is seek and read from it.
* Add appveyor config for Windows CI
The only tricky bit of this is renaming python.exe to python2.exe.
This is due to util.try_find_python2_interpreter(), which may well
need work for Windows since the version symlinks don't exist on Windows.
* Fixing Windows tests
Most of these fixes revolve around the path separator and the way
Windows handles files and locking. There is one bug fix in here -
build.write_cache() was using os.rename to replace a file, which
fails on Windows. I was only able to fix that for Python 3.3 and up.
* More subtle translation of / to \ in error messages for Windows.
(The goal is to avoid having to mark up tests just because they need
this kind of translation.)
All but the last bullet were by @jtatum (James Tatum).
0 commit comments