Patchwork [3,of,3,v2] tests: mark test-check-pyflakes.t as requiring hg1.0+

login
register
mail settings
Submitter timeless
Date May 8, 2016, 8:28 p.m.
Message ID <46867185309ea972a6d0.1462739329@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/14971/
State Superseded, archived
Headers show

Comments

timeless - May 8, 2016, 8:28 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1462440369 0
#      Thu May 05 09:26:09 2016 +0000
# Node ID 46867185309ea972a6d092e603d8eb378c91c678
# Parent  f8240a5eda50df7765894a0ee80488612d65f331
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r 46867185309e
tests: mark test-check-pyflakes.t as requiring hg1.0+

hg does not yet run with py3, so if you try:
./run-tests.py --local test-check-pyflakes.t

... it will try to run the local hg, which does not work
and thus, hg locate will return no output to stdout (and
stderr is sent to /dev/null).

If you do:
./run-tests.py --with-hg=~/bin/hg test-check-pyflakes.t
Then it should work, if your hg is new enough to have
a locate command (hg0.6 does not have locate).
Yuya Nishihara - May 11, 2016, 1:32 p.m.
On Sun, 08 May 2016 20:28:49 +0000, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1462440369 0
> #      Thu May 05 09:26:09 2016 +0000
> # Node ID 46867185309ea972a6d092e603d8eb378c91c678
> # Parent  f8240a5eda50df7765894a0ee80488612d65f331
> # Available At bb://timeless/mercurial-crew
> #              hg pull bb://timeless/mercurial-crew -r 46867185309e
> tests: mark test-check-pyflakes.t as requiring hg1.0+

I've picked this patch, thanks.

> diff -r f8240a5eda50 -r 46867185309e tests/test-check-pyflakes.t
> --- a/tests/test-check-pyflakes.t	Thu May 05 09:12:26 2016 +0000
> +++ b/tests/test-check-pyflakes.t	Thu May 05 09:26:09 2016 +0000
> @@ -1,4 +1,4 @@
> -#require test-repo pyflakes
> +#require test-repo pyflakes hg10

BTW, do we plan to add version requirements to all tests?
timeless - May 11, 2016, 2:04 p.m.
On Wed, May 11, 2016 at 9:32 AM, Yuya Nishihara <yuya@tcha.org> wrote:
> BTW, do we plan to add version requirements to all tests?

I think I'm going to as I go. I have a series [1] which includes --rev
argument for run-tests.py which lets you build a different version of
hg for testing.

The specific reason* initially for these checks is just to let me run
things and say "if hg isn't working enough, I should skip this check",
and "hg" means "py3 hg".

Eventually that would mean that anything that uses hg in its tests
would have a require hgXX, and I could have a testsuite that passes
py3 hg w/o having a working hg. -- Admittedly, not the most useful
thing in the world, but the report would be intuitive since the skip
report says why a test is skipped, and it's cleaner than getting a
whole bunch of useless diffs with python crashing because of syntax
errors.

* Actually, I'm not sure if I was working on this while doing py3
work, pypy work, or runtests-rev work

[1] http://patchwork.serpentine.com/patch/14655/
Yuya Nishihara - May 12, 2016, 2:14 p.m.
On Wed, 11 May 2016 10:04:19 -0400, timeless wrote:
> On Wed, May 11, 2016 at 9:32 AM, Yuya Nishihara <yuya@tcha.org> wrote:
> > BTW, do we plan to add version requirements to all tests?  
> 
> I think I'm going to as I go. I have a series [1] which includes --rev
> argument for run-tests.py which lets you build a different version of
> hg for testing.
> 
> The specific reason* initially for these checks is just to let me run
> things and say "if hg isn't working enough, I should skip this check",
> and "hg" means "py3 hg".
> 
> Eventually that would mean that anything that uses hg in its tests
> would have a require hgXX, and I could have a testsuite that passes
> py3 hg w/o having a working hg.

Hmm, perhaps we can do that for test-check-* that run "hg" as a tool.

I don't think we should do for the other tests that actually test the behavior
of "hg". It would be boring to maintain all tests pass with all hg versions.
timeless - May 12, 2016, 2:23 p.m.
Yuya Nishihara wrote:
> Hmm, perhaps we can do that for test-check-* that run "hg" as a tool.

That's probably good enough for now.

My goal here is to do this as I go, and not just sprinkle it everywhere.

> I don't think we should do for the other tests that actually test the
behavior
> of "hg". It would be boring to maintain all tests pass with all hg
versions.

I haven't figured out exactly what I want there. One way to look at it is
that if a test fails in a revision, that's a failure, and that's OK.

I'm mostly interested in: "does the feature the test is checking exist in a
version?". If amend was added in 3.0, then setting 3.0 as a requirement
seems reasonable. If it happens to be broken in 3.0 because the feature was
initially buggy, then let it fail, but don't try to run the amend test in
2.9 where amend wasn't present.

*I don't know when amend was added, and I'm about to fly away for the
weekend.

Patch

diff -r f8240a5eda50 -r 46867185309e tests/test-check-pyflakes.t
--- a/tests/test-check-pyflakes.t	Thu May 05 09:12:26 2016 +0000
+++ b/tests/test-check-pyflakes.t	Thu May 05 09:26:09 2016 +0000
@@ -1,4 +1,4 @@ 
-#require test-repo pyflakes
+#require test-repo pyflakes hg10
 
   $ cd "`dirname "$TESTDIR"`"