Mercurial > hg
changeset 25177:c3459555318e
run-tests: resurrect the wifexited polyfill (backout 6ab5a1c9ea3c)
Python 2.7.3 on Windows doesn't have os.WIFEXITED, and the test output looked
like this before I interrupted it.
$ ./run-tests.py --local -j2 -t700
EEEEEEEEEEEEEEEEEEEEEE
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 18 May 2015 15:34:42 -0400 |
parents | 665a9deae8dd |
children | ebc41dae840a |
files | tests/run-tests.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)