tests/run-tests.py
changeset 25177 c3459555318e
parent 25162 153b9c5235c2
child 25261 27600986a0d9
--- a/tests/run-tests.py	Mon May 18 02:53:08 2015 +0900
+++ b/tests/run-tests.py	Mon May 18 15:34:42 2015 -0400
@@ -103,6 +103,9 @@
 
     _strpath = _bytespath
 
+# For Windows support
+wifexited = getattr(os, "WIFEXITED", lambda x: False)
+
 def checkportisavailable(port):
     """return true if a port seems free to bind on localhost"""
     try:
@@ -804,7 +807,7 @@
             raise
 
         ret = proc.wait()
-        if os.WIFEXITED(ret):
+        if wifexited(ret):
             ret = os.WEXITSTATUS(ret)
 
         if proc.timeout:
@@ -905,7 +908,7 @@
                       self._testtmp, 0, self._getenv())
         stdout, stderr = proc.communicate()
         ret = proc.wait()
-        if os.WIFEXITED(ret):
+        if wifexited(ret):
             ret = os.WEXITSTATUS(ret)
         if ret == 2:
             print(stdout)