summaryrefslogtreecommitdiffstats
path: root/QMTest/TestCmd.py
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2014-08-22 00:59:35 (GMT)
committerGary Oberbrunner <garyo@oberbrunner.com>2014-08-22 00:59:35 (GMT)
commitaf7ae3e0489ca6f58a2581add0ceb7da4e7ccf0d (patch)
treef04bbc9e297aed126b42b78009bdd43fb2dae1e5 /QMTest/TestCmd.py
parent6db60dbe1c3dc28f24bfca48135bcb4bc9bd66d6 (diff)
downloadSCons-af7ae3e0489ca6f58a2581add0ceb7da4e7ccf0d.zip
SCons-af7ae3e0489ca6f58a2581add0ceb7da4e7ccf0d.tar.gz
SCons-af7ae3e0489ca6f58a2581add0ceb7da4e7ccf0d.tar.bz2
Fixed or skipped tests that fail on Windows.
Mostly just per-test changes, but also made match_re strip out CR (\r) chars at end of lines to make Windows match properly.
Diffstat (limited to 'QMTest/TestCmd.py')
-rw-r--r--QMTest/TestCmd.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/QMTest/TestCmd.py b/QMTest/TestCmd.py
index b51d90f..3048973 100644
--- a/QMTest/TestCmd.py
+++ b/QMTest/TestCmd.py
@@ -486,7 +486,8 @@ def match_re(lines = None, res = None):
"""
"""
if not is_List(lines):
- lines = lines.split("\n")
+ # CRs mess up matching (Windows) so split carefully
+ lines = re.split('\r?\n', lines)
if not is_List(res):
res = res.split("\n")
if len(lines) != len(res):
@@ -683,7 +684,7 @@ if subprocess.mswindows:
assert ol is None
lpBuffer = ctypes.create_string_buffer(bufSize)
bytesRead = DWORD()
- bErr = ctypes.windll.kernel32.ReadFile(
+ bErr = ctypes.windll.kernel32.ReadFile(
hFile, lpBuffer, bufSize, ctypes.byref(bytesRead), ol)
if not bErr: raise ctypes.WinError()
return (0, ctypes.string_at(lpBuffer, bytesRead.value))