Patchwork tests: silence test-repo obsolete warning

login
register
mail settings
Submitter timeless
Date May 11, 2016, 5:21 a.m.
Message ID <cfb766fa3a0d41c83a57.1462944082@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/15004/
State Superseded, archived
Headers show

Comments

timeless - May 11, 2016, 5:21 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1462942167 0
#      Wed May 11 04:49:27 2016 +0000
# Node ID cfb766fa3a0d41c83a57172c6a167caf1930a727
# Parent  401c5c11d34ffc7dc226bffe5612ba9bcdc686b7
# EXP-Topic runtests
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r cfb766fa3a0d
tests: silence test-repo obsolete warning

refactoring test-check-commit.t HGRCPATH bits as testrepo-helpers.sh
Pierre-Yves David - May 11, 2016, 2:58 p.m.
On 05/11/2016 07:21 AM, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1462942167 0
> #      Wed May 11 04:49:27 2016 +0000
> # Node ID cfb766fa3a0d41c83a57172c6a167caf1930a727
> # Parent  401c5c11d34ffc7dc226bffe5612ba9bcdc686b7
> # EXP-Topic runtests
> # Available At bb://timeless/mercurial-crew
> #              hg pull bb://timeless/mercurial-crew -r cfb766fa3a0d
> tests: silence test-repo obsolete warning
>
> refactoring test-check-commit.t HGRCPATH bits as testrepo-helpers.sh
>
> […]
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/testrepo-helpers.sh
> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/tests/testrepo-helpers.sh	Wed May 11 04:49:27 2016 +0000
> @@ -0,0 +1,4 @@
> +cat >> $HGRCPATH << EOF
> +[experimental]
> +evolution=createmarkers
> +EOF

I'm not fan of the file name but I do no have a much better idea. 
However, we need a some comment in this file that explain its purpose. 
testrepo-helpers.sh is very generic and it is not clear this should be 
used of for test using Mercurial on the source repository only. I would 
not want people to start including it in all test files, leading evolve 
to be enabled everywhere.

If you provide me with a comment in a reply to this email I'll probably 
include it in flight.

cheers,
timeless - May 11, 2016, 3:06 p.m.
On Wed, May 11, 2016 at 10:58 AM, Pierre-Yves David
<pierre-yves.david@ens-lyon.org> wrote:
>> refactoring test-check-commit.t HGRCPATH bits as testrepo-helpers.sh
>> +++ b/tests/testrepo-helpers.sh Wed May 11 04:49:27 2016 +0000

> I'm not fan of the file name but I do no have a much better idea.

I hate the name. I was hoping *someone* would offer a better name.
This name conflicts w/ tab completion sufficiently badly, that i'd rather:

helper-testrepo.sh (it's a simple s///g + commit message change)

> However,
> we need a some comment in this file that explain its purpose.
> testrepo-helpers.sh is very generic and it is not clear this should be used
> of for test using Mercurial on the source repository only. I would not want
> people to start including it in all test files, leading evolve to be enabled
> everywhere.
>
> If you provide me with a comment in a reply to this email I'll probably
> include it in flight.

# The test-repo is a live hg repository which may have evolution
# markers created, e.g. when a ~/.hgrc enabled evolution.
# Tests are run using a custom HGRCPATH, which do not
# enable evolution markers by default.
# If test-repo includes evolution markers, and we do not
# enable evolution markers, hg will occasionally complain
# when it notices them, which disrupts tests resulting in
# sporadic failures.
# Since we aren't performing any write operations on the
# test-repo, there's no harm in telling hg that we support
# evolution markers, which is what the following lines
# for the hgrc file do:
Augie Fackler - May 11, 2016, 3:50 p.m.
On Wed, May 11, 2016 at 05:21:22AM +0000, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1462942167 0
> #      Wed May 11 04:49:27 2016 +0000
> # Node ID cfb766fa3a0d41c83a57172c6a167caf1930a727
> # Parent  401c5c11d34ffc7dc226bffe5612ba9bcdc686b7
> # EXP-Topic runtests
> # Available At bb://timeless/mercurial-crew
> #              hg pull bb://timeless/mercurial-crew -r cfb766fa3a0d
> tests: silence test-repo obsolete warning

Queued this, thanks.

>
> refactoring test-check-commit.t HGRCPATH bits as testrepo-helpers.sh
>
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-code.t
> --- a/tests/test-check-code.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-check-code.t	Wed May 11 04:49:27 2016 +0000
> @@ -1,5 +1,6 @@
>  #require test-repo
>
> +  $ . "$TESTDIR/testrepo-helpers.sh"
>    $ check_code="$TESTDIR"/../contrib/check-code.py
>    $ cd "$TESTDIR"/..
>
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-commit.t
> --- a/tests/test-check-commit.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-check-commit.t	Wed May 11 04:49:27 2016 +0000
> @@ -2,10 +2,7 @@
>
>  Enable obsolescence to avoid the warning issue when obsmarker are found
>
> -  $ cat >> $HGRCPATH << EOF
> -  > [experimental]
> -  > evolution=createmarkers
> -  > EOF
> +  $ . "$TESTDIR/testrepo-helpers.sh"
>
>  Go back in the hg repo
>
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-config.t
> --- a/tests/test-check-config.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-check-config.t	Wed May 11 04:49:27 2016 +0000
> @@ -1,5 +1,6 @@
>  #require test-repo
>
> +  $ . "$TESTDIR/testrepo-helpers.sh"
>    $ cd "$TESTDIR"/..
>
>  New errors are not allowed. Warnings are strongly discouraged.
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-execute.t
> --- a/tests/test-check-execute.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-check-execute.t	Wed May 11 04:49:27 2016 +0000
> @@ -1,5 +1,6 @@
>  #require test-repo execbit
>
> +  $ . "$TESTDIR/testrepo-helpers.sh"
>    $ cd "`dirname "$TESTDIR"`"
>
>  look for python scripts without the execute bit
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-module-imports.t
> --- a/tests/test-check-module-imports.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-check-module-imports.t	Wed May 11 04:49:27 2016 +0000
> @@ -1,5 +1,6 @@
>  #require test-repo
>
> +  $ . "$TESTDIR/testrepo-helpers.sh"
>    $ import_checker="$TESTDIR"/../contrib/import-checker.py
>
>  Run the doctests from the import checker, and make sure
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-py3-compat.t
> --- a/tests/test-check-py3-compat.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-check-py3-compat.t	Wed May 11 04:49:27 2016 +0000
> @@ -1,5 +1,6 @@
>  #require test-repo
>
> +  $ . "$TESTDIR/testrepo-helpers.sh"
>    $ cd "$TESTDIR"/..
>
>    $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-pyflakes.t
> --- a/tests/test-check-pyflakes.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-check-pyflakes.t	Wed May 11 04:49:27 2016 +0000
> @@ -1,5 +1,6 @@
>  #require test-repo pyflakes
>
> +  $ . "$TESTDIR/testrepo-helpers.sh"
>    $ cd "`dirname "$TESTDIR"`"
>
>  run pyflakes on all tracked files ending in .py or without a file ending
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-shbang.t
> --- a/tests/test-check-shbang.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-check-shbang.t	Wed May 11 04:49:27 2016 +0000
> @@ -1,5 +1,6 @@
>  #require test-repo
>
> +  $ . "$TESTDIR/testrepo-helpers.sh"
>    $ cd "`dirname "$TESTDIR"`"
>
>  look for python scripts that do not use /usr/bin/env
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-contrib-perf.t
> --- a/tests/test-contrib-perf.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-contrib-perf.t	Wed May 11 04:49:27 2016 +0000
> @@ -2,6 +2,7 @@
>
>  Set vars:
>
> +  $ . "$TESTDIR/testrepo-helpers.sh"
>    $ CONTRIBDIR="$TESTDIR/../contrib"
>
>  Prepare repo:
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-debian-packages.t
> --- a/tests/test-debian-packages.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-debian-packages.t	Wed May 11 04:49:27 2016 +0000
> @@ -1,5 +1,7 @@
>  #require test-repo slow debhelper
>
> +  $ . "$TESTDIR/testrepo-helpers.sh"
> +
>  Ensure debuild doesn't run the testsuite, as that could get silly.
>    $ DEB_BUILD_OPTIONS=nocheck
>    $ export DEB_BUILD_OPTIONS
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-docker-packaging.t
> --- a/tests/test-docker-packaging.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-docker-packaging.t	Wed May 11 04:49:27 2016 +0000
> @@ -1,5 +1,7 @@
>  #require test-repo slow docker
>
> +  $ . "$TESTDIR/testrepo-helpers.sh"
> +
>  Ensure debuild doesn't run the testsuite, as that could get silly.
>    $ DEB_BUILD_OPTIONS=nocheck
>    $ export DEB_BUILD_OPTIONS
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-install.t
> --- a/tests/test-install.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-install.t	Wed May 11 04:49:27 2016 +0000
> @@ -70,6 +70,8 @@
>    no problems detected
>
>  #if test-repo
> +  $ . "$TESTDIR/testrepo-helpers.sh"
> +
>    $ cat >> wixxml.py << EOF
>    > import os, subprocess, sys
>    > import xml.etree.ElementTree as ET
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-mac-packages.t
> --- a/tests/test-mac-packages.t	Fri May 06 19:24:25 2016 +0000
> +++ b/tests/test-mac-packages.t	Wed May 11 04:49:27 2016 +0000
> @@ -1,4 +1,7 @@
>  #require test-repo slow osx osxpackaging
> +
> +  $ . "$TESTDIR/testrepo-helpers.sh"
> +
>    $ OUTPUTDIR=`pwd`
>    $ export OUTPUTDIR
>    $ KEEPMPKG=yes
> diff -r 401c5c11d34f -r cfb766fa3a0d tests/testrepo-helpers.sh
> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/tests/testrepo-helpers.sh	Wed May 11 04:49:27 2016 +0000
> @@ -0,0 +1,4 @@
> +cat >> $HGRCPATH << EOF
> +[experimental]
> +evolution=createmarkers
> +EOF
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Augie Fackler - May 11, 2016, 4:30 p.m.
On Wed, May 11, 2016 at 11:50:20AM -0400, Augie Fackler wrote:
> On Wed, May 11, 2016 at 05:21:22AM +0000, timeless wrote:
> > # HG changeset patch
> > # User timeless <timeless@mozdev.org>
> > # Date 1462942167 0
> > #      Wed May 11 04:49:27 2016 +0000
> > # Node ID cfb766fa3a0d41c83a57172c6a167caf1930a727
> > # Parent  401c5c11d34ffc7dc226bffe5612ba9bcdc686b7
> > # EXP-Topic runtests
> > # Available At bb://timeless/mercurial-crew
> > #              hg pull bb://timeless/mercurial-crew -r cfb766fa3a0d
> > tests: silence test-repo obsolete warning
>
> Queued this, thanks.

Dropping this per raced emails.

Patch

diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-code.t
--- a/tests/test-check-code.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-check-code.t	Wed May 11 04:49:27 2016 +0000
@@ -1,5 +1,6 @@ 
 #require test-repo
 
+  $ . "$TESTDIR/testrepo-helpers.sh"
   $ check_code="$TESTDIR"/../contrib/check-code.py
   $ cd "$TESTDIR"/..
 
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-commit.t
--- a/tests/test-check-commit.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-check-commit.t	Wed May 11 04:49:27 2016 +0000
@@ -2,10 +2,7 @@ 
 
 Enable obsolescence to avoid the warning issue when obsmarker are found
 
-  $ cat >> $HGRCPATH << EOF
-  > [experimental]
-  > evolution=createmarkers
-  > EOF
+  $ . "$TESTDIR/testrepo-helpers.sh"
 
 Go back in the hg repo
 
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-config.t
--- a/tests/test-check-config.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-check-config.t	Wed May 11 04:49:27 2016 +0000
@@ -1,5 +1,6 @@ 
 #require test-repo
 
+  $ . "$TESTDIR/testrepo-helpers.sh"
   $ cd "$TESTDIR"/..
 
 New errors are not allowed. Warnings are strongly discouraged.
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-execute.t
--- a/tests/test-check-execute.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-check-execute.t	Wed May 11 04:49:27 2016 +0000
@@ -1,5 +1,6 @@ 
 #require test-repo execbit
 
+  $ . "$TESTDIR/testrepo-helpers.sh"
   $ cd "`dirname "$TESTDIR"`"
 
 look for python scripts without the execute bit
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-module-imports.t
--- a/tests/test-check-module-imports.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-check-module-imports.t	Wed May 11 04:49:27 2016 +0000
@@ -1,5 +1,6 @@ 
 #require test-repo
 
+  $ . "$TESTDIR/testrepo-helpers.sh"
   $ import_checker="$TESTDIR"/../contrib/import-checker.py
 
 Run the doctests from the import checker, and make sure
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-check-py3-compat.t	Wed May 11 04:49:27 2016 +0000
@@ -1,5 +1,6 @@ 
 #require test-repo
 
+  $ . "$TESTDIR/testrepo-helpers.sh"
   $ cd "$TESTDIR"/..
 
   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-pyflakes.t
--- a/tests/test-check-pyflakes.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-check-pyflakes.t	Wed May 11 04:49:27 2016 +0000
@@ -1,5 +1,6 @@ 
 #require test-repo pyflakes
 
+  $ . "$TESTDIR/testrepo-helpers.sh"
   $ cd "`dirname "$TESTDIR"`"
 
 run pyflakes on all tracked files ending in .py or without a file ending
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-check-shbang.t
--- a/tests/test-check-shbang.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-check-shbang.t	Wed May 11 04:49:27 2016 +0000
@@ -1,5 +1,6 @@ 
 #require test-repo
 
+  $ . "$TESTDIR/testrepo-helpers.sh"
   $ cd "`dirname "$TESTDIR"`"
 
 look for python scripts that do not use /usr/bin/env
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-contrib-perf.t
--- a/tests/test-contrib-perf.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-contrib-perf.t	Wed May 11 04:49:27 2016 +0000
@@ -2,6 +2,7 @@ 
 
 Set vars:
 
+  $ . "$TESTDIR/testrepo-helpers.sh"
   $ CONTRIBDIR="$TESTDIR/../contrib"
 
 Prepare repo:
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-debian-packages.t
--- a/tests/test-debian-packages.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-debian-packages.t	Wed May 11 04:49:27 2016 +0000
@@ -1,5 +1,7 @@ 
 #require test-repo slow debhelper
 
+  $ . "$TESTDIR/testrepo-helpers.sh"
+
 Ensure debuild doesn't run the testsuite, as that could get silly.
   $ DEB_BUILD_OPTIONS=nocheck
   $ export DEB_BUILD_OPTIONS
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-docker-packaging.t
--- a/tests/test-docker-packaging.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-docker-packaging.t	Wed May 11 04:49:27 2016 +0000
@@ -1,5 +1,7 @@ 
 #require test-repo slow docker
 
+  $ . "$TESTDIR/testrepo-helpers.sh"
+
 Ensure debuild doesn't run the testsuite, as that could get silly.
   $ DEB_BUILD_OPTIONS=nocheck
   $ export DEB_BUILD_OPTIONS
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-install.t
--- a/tests/test-install.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-install.t	Wed May 11 04:49:27 2016 +0000
@@ -70,6 +70,8 @@ 
   no problems detected
 
 #if test-repo
+  $ . "$TESTDIR/testrepo-helpers.sh"
+
   $ cat >> wixxml.py << EOF
   > import os, subprocess, sys
   > import xml.etree.ElementTree as ET
diff -r 401c5c11d34f -r cfb766fa3a0d tests/test-mac-packages.t
--- a/tests/test-mac-packages.t	Fri May 06 19:24:25 2016 +0000
+++ b/tests/test-mac-packages.t	Wed May 11 04:49:27 2016 +0000
@@ -1,4 +1,7 @@ 
 #require test-repo slow osx osxpackaging
+
+  $ . "$TESTDIR/testrepo-helpers.sh"
+
   $ OUTPUTDIR=`pwd`
   $ export OUTPUTDIR
   $ KEEPMPKG=yes
diff -r 401c5c11d34f -r cfb766fa3a0d tests/testrepo-helpers.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/testrepo-helpers.sh	Wed May 11 04:49:27 2016 +0000
@@ -0,0 +1,4 @@ 
+cat >> $HGRCPATH << EOF
+[experimental]
+evolution=createmarkers
+EOF