Patchwork tests: redirect virtualenv stderr to same file as stdout

login
register
mail settings
Submitter Augie Fackler
Date June 20, 2017, 8:53 p.m.
Message ID <ff3964f237d601e7c375.1497991995@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/21544/
State Rejected
Headers show

Comments

Augie Fackler - June 20, 2017, 8:53 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1497991974 14400
#      Tue Jun 20 16:52:54 2017 -0400
# Node ID ff3964f237d601e7c375c10fbf93029b5db39307
# Parent  0ce2cbebd74964ffe61e79de8941461bccc9371b
tests: redirect virtualenv stderr to same file as stdout

I'm seeing some failures on the Solaris buildbots due to a warning
about an old pip, but I can't reproduce this locally. Hopefully this helps.
Augie Fackler - June 20, 2017, 9 p.m.
> On Jun 20, 2017, at 16:53, Augie Fackler <raf@durin42.com> wrote:
> 
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1497991974 14400
> #      Tue Jun 20 16:52:54 2017 -0400
> # Node ID ff3964f237d601e7c375c10fbf93029b5db39307
> # Parent  0ce2cbebd74964ffe61e79de8941461bccc9371b
> tests: redirect virtualenv stderr to same file as stdout
> 
> I'm seeing some failures on the Solaris buildbots due to a warning
> about an old pip, but I can't reproduce this locally. Hopefully this helps.

Specifically, this is for https://buildbot.mercurial-scm.org/builders/Solaris%2012%20x86%20tests/builds/204/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio - I think I got it right, but I honestly have no idea. Can you check and see if this fixes that test on that machine?

Thanks!

> 
> diff --git a/tests/test-install.t b/tests/test-install.t
> --- a/tests/test-install.t
> +++ b/tests/test-install.t
> @@ -185,7 +185,7 @@ Note: --no-site-packages is deprecated, 
> ancient virtualenv from their linux distro or similar and it's not yet
> the default for them.
>   $ unset PYTHONPATH
> -  $ $PYTHON -m virtualenv --no-site-packages --never-download installenv >> pip.log
> +  $ $PYTHON -m virtualenv --no-site-packages --never-download installenv >> pip.log 2>&1
> Note: we use this weird path to run pip and hg to avoid platform differences,
> since it's bin on most platforms but Scripts on Windows.
>   $ ./installenv/*/pip install $TESTDIR/.. >> pip.log
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Sean Farley - June 20, 2017, 9 p.m.
Augie Fackler <raf@durin42.com> writes:

> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1497991974 14400
> #      Tue Jun 20 16:52:54 2017 -0400
> # Node ID ff3964f237d601e7c375c10fbf93029b5db39307
> # Parent  0ce2cbebd74964ffe61e79de8941461bccc9371b
> tests: redirect virtualenv stderr to same file as stdout
>
> I'm seeing some failures on the Solaris buildbots due to a warning
> about an old pip, but I can't reproduce this locally. Hopefully this helps.

Danek?
Danek Duvall - June 20, 2017, 9:07 p.m.
Augie Fackler wrote:

> 
> > On Jun 20, 2017, at 16:53, Augie Fackler <raf@durin42.com> wrote:
> > 
> > # HG changeset patch
> > # User Augie Fackler <augie@google.com>
> > # Date 1497991974 14400
> > #      Tue Jun 20 16:52:54 2017 -0400
> > # Node ID ff3964f237d601e7c375c10fbf93029b5db39307
> > # Parent  0ce2cbebd74964ffe61e79de8941461bccc9371b
> > tests: redirect virtualenv stderr to same file as stdout
> > 
> > I'm seeing some failures on the Solaris buildbots due to a warning
> > about an old pip, but I can't reproduce this locally. Hopefully this helps.
> 
> Specifically, this is for https://buildbot.mercurial-scm.org/builders/Solaris%2012%20x86%20tests/builds/204/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio - I think I got it right, but I honestly have no idea. Can you check and see if this fixes that test on that machine?

I think the 2>&1 would need to be on the subsequent pip install command,
but I'll make sure.

Danek

> Thanks!
> 
> > 
> > diff --git a/tests/test-install.t b/tests/test-install.t
> > --- a/tests/test-install.t
> > +++ b/tests/test-install.t
> > @@ -185,7 +185,7 @@ Note: --no-site-packages is deprecated, 
> > ancient virtualenv from their linux distro or similar and it's not yet
> > the default for them.
> >   $ unset PYTHONPATH
> > -  $ $PYTHON -m virtualenv --no-site-packages --never-download installenv >> pip.log
> > +  $ $PYTHON -m virtualenv --no-site-packages --never-download installenv >> pip.log 2>&1
> > Note: we use this weird path to run pip and hg to avoid platform differences,
> > since it's bin on most platforms but Scripts on Windows.
> >   $ ./installenv/*/pip install $TESTDIR/.. >> pip.log
> > _______________________________________________
> > Mercurial-devel mailing list
> > Mercurial-devel@mercurial-scm.org
> > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Danek Duvall - June 20, 2017, 9:26 p.m.
Danek Duvall wrote:

> Augie Fackler wrote:
> 
> > 
> > > On Jun 20, 2017, at 16:53, Augie Fackler <raf@durin42.com> wrote:
> > > 
> > > # HG changeset patch
> > > # User Augie Fackler <augie@google.com>
> > > # Date 1497991974 14400
> > > #      Tue Jun 20 16:52:54 2017 -0400
> > > # Node ID ff3964f237d601e7c375c10fbf93029b5db39307
> > > # Parent  0ce2cbebd74964ffe61e79de8941461bccc9371b
> > > tests: redirect virtualenv stderr to same file as stdout
> > > 
> > > I'm seeing some failures on the Solaris buildbots due to a warning
> > > about an old pip, but I can't reproduce this locally. Hopefully this helps.
> > 
> > Specifically, this is for https://buildbot.mercurial-scm.org/builders/Solaris%2012%20x86%20tests/builds/204/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio - I think I got it right, but I honestly have no idea. Can you check and see if this fixes that test on that machine?
> 
> I think the 2>&1 would need to be on the subsequent pip install command,
> but I'll make sure.

Indeed, that's correct.

But assuming that all necessary versions of pip have it, there's also the
--disable-pip-version-check flag, or --no-index, which implies it.  I just
ran a test (as myself, not in the same environment as the tests), and
--no-index makes the message go away, as well as lets the test succeed
without redirecting stderr.

Danek
Augie Fackler - June 20, 2017, 9:27 p.m.
> On Jun 20, 2017, at 17:07, Danek Duvall <danek.duvall@oracle.com> wrote:
> 
> Augie Fackler wrote:
> 
>> 
>>> On Jun 20, 2017, at 16:53, Augie Fackler <raf@durin42.com> wrote:
>>> 
>>> # HG changeset patch
>>> # User Augie Fackler <augie@google.com>
>>> # Date 1497991974 14400
>>> #      Tue Jun 20 16:52:54 2017 -0400
>>> # Node ID ff3964f237d601e7c375c10fbf93029b5db39307
>>> # Parent  0ce2cbebd74964ffe61e79de8941461bccc9371b
>>> tests: redirect virtualenv stderr to same file as stdout
>>> 
>>> I'm seeing some failures on the Solaris buildbots due to a warning
>>> about an old pip, but I can't reproduce this locally. Hopefully this helps.
>> 
>> Specifically, this is for https://buildbot.mercurial-scm.org/builders/Solaris%2012%20x86%20tests/builds/204/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio - I think I got it right, but I honestly have no idea. Can you check and see if this fixes that test on that machine?
> 
> I think the 2>&1 would need to be on the subsequent pip install command,
> but I'll make sure.

D'oh. you're right. Could you test that instead of what I sent? (Or maybe just do both.)
Thanks!

> 
> Danek
> 
>> Thanks!
>> 
>>> 
>>> diff --git a/tests/test-install.t b/tests/test-install.t
>>> --- a/tests/test-install.t
>>> +++ b/tests/test-install.t
>>> @@ -185,7 +185,7 @@ Note: --no-site-packages is deprecated, 
>>> ancient virtualenv from their linux distro or similar and it's not yet
>>> the default for them.
>>>  $ unset PYTHONPATH
>>> -  $ $PYTHON -m virtualenv --no-site-packages --never-download installenv >> pip.log
>>> +  $ $PYTHON -m virtualenv --no-site-packages --never-download installenv >> pip.log 2>&1
>>> Note: we use this weird path to run pip and hg to avoid platform differences,
>>> since it's bin on most platforms but Scripts on Windows.
>>>  $ ./installenv/*/pip install $TESTDIR/.. >> pip.log
>>> _______________________________________________
>>> Mercurial-devel mailing list
>>> Mercurial-devel@mercurial-scm.org
>>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Augie Fackler - June 20, 2017, 9:30 p.m.
> On Jun 20, 2017, at 17:26, Danek Duvall <danek.duvall@oracle.com> wrote:
> 
> Danek Duvall wrote:
> 
>> Augie Fackler wrote:
>> 
>>> 
>>>> On Jun 20, 2017, at 16:53, Augie Fackler <raf@durin42.com> wrote:
>>>> 
>>>> # HG changeset patch
>>>> # User Augie Fackler <augie@google.com>
>>>> # Date 1497991974 14400
>>>> #      Tue Jun 20 16:52:54 2017 -0400
>>>> # Node ID ff3964f237d601e7c375c10fbf93029b5db39307
>>>> # Parent  0ce2cbebd74964ffe61e79de8941461bccc9371b
>>>> tests: redirect virtualenv stderr to same file as stdout
>>>> 
>>>> I'm seeing some failures on the Solaris buildbots due to a warning
>>>> about an old pip, but I can't reproduce this locally. Hopefully this helps.
>>> 
>>> Specifically, this is for https://buildbot.mercurial-scm.org/builders/Solaris%2012%20x86%20tests/builds/204/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio - I think I got it right, but I honestly have no idea. Can you check and see if this fixes that test on that machine?
>> 
>> I think the 2>&1 would need to be on the subsequent pip install command,
>> but I'll make sure.
> 
> Indeed, that's correct.
> 
> But assuming that all necessary versions of pip have it, there's also the
> --disable-pip-version-check flag, or --no-index, which implies it.  I just
> ran a test (as myself, not in the same environment as the tests), and
> --no-index makes the message go away, as well as lets the test succeed
> without redirecting stderr.

Ooh, nice. If you send that patch CC me and I'll test it and hopefully land it. Nice eye!

> 
> Danek

Patch

diff --git a/tests/test-install.t b/tests/test-install.t
--- a/tests/test-install.t
+++ b/tests/test-install.t
@@ -185,7 +185,7 @@  Note: --no-site-packages is deprecated, 
 ancient virtualenv from their linux distro or similar and it's not yet
 the default for them.
   $ unset PYTHONPATH
-  $ $PYTHON -m virtualenv --no-site-packages --never-download installenv >> pip.log
+  $ $PYTHON -m virtualenv --no-site-packages --never-download installenv >> pip.log 2>&1
 Note: we use this weird path to run pip and hg to avoid platform differences,
 since it's bin on most platforms but Scripts on Windows.
   $ ./installenv/*/pip install $TESTDIR/.. >> pip.log