Submitter | Augie Fackler |
---|---|
Date | May 18, 2015, 3:58 p.m. |
Message ID | <57acc2e6aa0e382289b2.1431964720@augie-macbookair2.roam.corp.google.com> |
Download | mbox | patch |
Permalink | /patch/9128/ |
State | Accepted |
Commit | 6ab5a1c9ea3cec127eb091d5c8337337363b8a7b |
Headers | show |
Comments
This series LGTM. On Mon, May 18, 2015 at 8:58 AM, Augie Fackler <raf@durin42.com> wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com> > # Date 1431911704 14400 > # Sun May 17 21:15:04 2015 -0400 > # Node ID 57acc2e6aa0e382289b2e872df7416dbf229c714 > # Parent 0851b94ffcd70276eafaa3b19aadae60da9d72fa > run-tests: drop wifexited polyfill > > os.WIFEXITED exists as of python 2.6 for me, so we no longer need this > polyfill. > > diff --git a/tests/run-tests.py b/tests/run-tests.py > --- a/tests/run-tests.py > +++ b/tests/run-tests.py > @@ -87,8 +87,6 @@ if sys.version_info > (3, 0, 0): > if sys.version_info < (2, 5): > subprocess._cleanup = lambda: None > > -wifexited = getattr(os, "WIFEXITED", lambda x: False) > - > def checkportisavailable(port): > """return true if a port seems free to bind on localhost""" > try: > @@ -789,7 +787,7 @@ class Test(unittest.TestCase): > raise > > ret = proc.wait() > - if wifexited(ret): > + if os.WIFEXITED(ret): > ret = os.WEXITSTATUS(ret) > > if proc.timeout: > @@ -890,7 +888,7 @@ class TTest(Test): > self._testtmp, 0, self._getenv()) > stdout, stderr = proc.communicate() > ret = proc.wait() > - if wifexited(ret): > + if os.WIFEXITED(ret): > ret = os.WEXITSTATUS(ret) > if ret == 2: > print(stdout) > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@selenic.com > http://selenic.com/mailman/listinfo/mercurial-devel >
Thanks. I also got a verbal LG from mpm, so I'm pushing this (with a bunch of other stuff) to crew. > On May 18, 2015, at 11:44, Gregory Szorc <gregory.szorc@gmail.com> wrote: > > This series LGTM. > > On Mon, May 18, 2015 at 8:58 AM, Augie Fackler <raf@durin42.com <mailto:raf@durin42.com>> wrote: > # HG changeset patch > # User Augie Fackler <augie@google.com <mailto:augie@google.com>> > # Date 1431911704 14400 > # Sun May 17 21:15:04 2015 -0400 > # Node ID 57acc2e6aa0e382289b2e872df7416dbf229c714 > # Parent 0851b94ffcd70276eafaa3b19aadae60da9d72fa > run-tests: drop wifexited polyfill > > os.WIFEXITED exists as of python 2.6 for me, so we no longer need this > polyfill. > > diff --git a/tests/run-tests.py b/tests/run-tests.py > --- a/tests/run-tests.py > +++ b/tests/run-tests.py > @@ -87,8 +87,6 @@ if sys.version_info > (3, 0, 0): > if sys.version_info < (2, 5): > subprocess._cleanup = lambda: None > > -wifexited = getattr(os, "WIFEXITED", lambda x: False) > - > def checkportisavailable(port): > """return true if a port seems free to bind on localhost""" > try: > @@ -789,7 +787,7 @@ class Test(unittest.TestCase): > raise > > ret = proc.wait() > - if wifexited(ret): > + if os.WIFEXITED(ret): > ret = os.WEXITSTATUS(ret) > > if proc.timeout: > @@ -890,7 +888,7 @@ class TTest(Test): > self._testtmp, 0, self._getenv()) > stdout, stderr = proc.communicate() > ret = proc.wait() > - if wifexited(ret): > + if os.WIFEXITED(ret): > ret = os.WEXITSTATUS(ret) > if ret == 2: > print(stdout) > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@selenic.com <mailto:Mercurial-devel@selenic.com> > http://selenic.com/mailman/listinfo/mercurial-devel <http://selenic.com/mailman/listinfo/mercurial-devel> >
Patch
diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -87,8 +87,6 @@ if sys.version_info > (3, 0, 0): if sys.version_info < (2, 5): subprocess._cleanup = lambda: None -wifexited = getattr(os, "WIFEXITED", lambda x: False) - def checkportisavailable(port): """return true if a port seems free to bind on localhost""" try: @@ -789,7 +787,7 @@ class Test(unittest.TestCase): raise ret = proc.wait() - if wifexited(ret): + if os.WIFEXITED(ret): ret = os.WEXITSTATUS(ret) if proc.timeout: @@ -890,7 +888,7 @@ class TTest(Test): self._testtmp, 0, self._getenv()) stdout, stderr = proc.communicate() ret = proc.wait() - if wifexited(ret): + if os.WIFEXITED(ret): ret = os.WEXITSTATUS(ret) if ret == 2: print(stdout)