tests: silence test-repo obsolete warning
authortimeless <timeless@mozdev.org>
Wed, 11 May 2016 04:49:27 +0000
changeset 29219 3c9066ed557c
parent 29218 fd288d118074
child 29220 054bcdad6042
tests: silence test-repo obsolete warning refactoring test-check-commit.t HGRCPATH bits as helpers-testrepo.sh
tests/helpers-testrepo.sh
tests/test-check-code.t
tests/test-check-commit.t
tests/test-check-config.t
tests/test-check-execute.t
tests/test-check-module-imports.t
tests/test-check-py3-compat.t
tests/test-check-pyflakes.t
tests/test-check-shbang.t
tests/test-contrib-perf.t
tests/test-debian-packages.t
tests/test-docker-packaging.t
tests/test-install.t
tests/test-mac-packages.t
--- /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
--- a/tests/test-check-code.t	Mon May 09 10:05:32 2016 +0200
+++ 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"/..
 
--- a/tests/test-check-commit.t	Mon May 09 10:05:32 2016 +0200
+++ 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
 
--- a/tests/test-check-config.t	Mon May 09 10:05:32 2016 +0200
+++ 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.
--- a/tests/test-check-execute.t	Mon May 09 10:05:32 2016 +0200
+++ 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
--- a/tests/test-check-module-imports.t	Mon May 09 10:05:32 2016 +0200
+++ 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
--- a/tests/test-check-py3-compat.t	Mon May 09 10:05:32 2016 +0200
+++ 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
--- a/tests/test-check-pyflakes.t	Mon May 09 10:05:32 2016 +0200
+++ b/tests/test-check-pyflakes.t	Wed May 11 04:49:27 2016 +0000
@@ -1,5 +1,6 @@
 #require test-repo pyflakes hg10
 
+  $ . "$TESTDIR/helpers-testrepo.sh"
   $ cd "`dirname "$TESTDIR"`"
 
 run pyflakes on all tracked files ending in .py or without a file ending
--- a/tests/test-check-shbang.t	Mon May 09 10:05:32 2016 +0200
+++ 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
--- a/tests/test-contrib-perf.t	Mon May 09 10:05:32 2016 +0200
+++ 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:
--- a/tests/test-debian-packages.t	Mon May 09 10:05:32 2016 +0200
+++ 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
--- a/tests/test-docker-packaging.t	Mon May 09 10:05:32 2016 +0200
+++ 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
--- a/tests/test-install.t	Mon May 09 10:05:32 2016 +0200
+++ b/tests/test-install.t	Wed May 11 04:49:27 2016 +0000
@@ -78,6 +78,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
--- a/tests/test-mac-packages.t	Mon May 09 10:05:32 2016 +0200
+++ 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