Testsuite: write "\n" instead of "\r\n" when using mingw Python
authorThomas Miedema <thomasmiedema@gmail.com>
Fri, 17 Jun 2016 13:23:34 +0000 (15:23 +0200)
committerThomas Miedema <thomasmiedema@gmail.com>
Sat, 18 Jun 2016 10:46:05 +0000 (12:46 +0200)
commit6f6f515401a29d26eaa5daae308b8e700abd4c04
tree26c8c55437ec56debd68a3079e488ff339dee58f
parentf72f23f9f6ff2914ec99fc86f67c89927f18ba47
Testsuite: write "\n" instead of "\r\n" when using mingw Python

Mingw style Python uses '\r\n' by default for newlines. This is
annoying, because it means that when a GHC developer on Windows uses
mingw Python to `make accept` a test, every single line of the
.stderr file is touched. This makes it difficult to spot the real
changes, and it leads to unnecessary git history bloat.

Prevent this from happening by using io.open instead of open.
See `Note [Universal newlines]`

Reviewed by: Phyx

Differential Revision: https://phabricator.haskell.org/D2342
libraries/base/tests/IO/readwrite003.hs
testsuite/driver/runtests.py
testsuite/driver/testlib.py