Patchwork [1,of,6,v4] tests: silence test-repo obsolete warning

login
register
mail settings
Submitter timeless
Date May 11, 2016, 5:18 p.m.
Message ID <4871272844556ca7b7e4.1462987091@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/15020/
State Accepted, archived
Headers show

Comments

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

refactoring test-check-commit.t HGRCPATH bits as helpers-testrepo.sh

Patch

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