Patchwork [V2] tests: avoid obsolete marker warnings on the hg code repo without evolve

login
register
mail settings
Submitter Matt Harbison
Date May 7, 2016, 2:28 a.m.
Message ID <f3156cc10f6d6df6463f.1462588094@Envy>
Download mbox | patch
Permalink /patch/14959/
State Changes Requested
Headers show

Comments

Matt Harbison - May 7, 2016, 2:28 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1462585858 14400
#      Fri May 06 21:50:58 2016 -0400
# Node ID f3156cc10f6d6df6463f534279a3bd73a85fc06b
# Parent  af6d4a49e3615ac6cfa63b9c10811c28520434ea
tests: avoid obsolete marker warnings on the hg code repo without evolve

These tests run on the local Mercurial repository.  If evolve is enabled in a
config file other than the local file, it isn't loaded for the test, causing the
warning to be emitted if obsolete markers are found.  (Having said that, I see
that the Linux install I have enables evolve only from the user config, so maybe
this is somehow Windows specific?)

The problem tests observed between timeless and I were limited to *-shbang.t and
*-execute.t.  But since check-commit.t also had this from the beginning, I added
this to all of the other check-* tests with #require test-repo for consistency.

Patch

diff --git a/tests/test-check-code.t b/tests/test-check-code.t
--- a/tests/test-check-code.t
+++ b/tests/test-check-code.t
@@ -1,5 +1,11 @@ 
 #require test-repo
 
+  $ cat >> $HGRCPATH <<EOF
+  > # Silence "obsolete feature not enabled, but markers found" warnings
+  > [experimental]
+  > evolution=createmarkers
+  > EOF
+
   $ check_code="$TESTDIR"/../contrib/check-code.py
   $ cd "$TESTDIR"/..
 
diff --git a/tests/test-check-config.t b/tests/test-check-config.t
--- a/tests/test-check-config.t
+++ b/tests/test-check-config.t
@@ -1,5 +1,11 @@ 
 #require test-repo
 
+  $ cat >> $HGRCPATH <<EOF
+  > # Silence "obsolete feature not enabled, but markers found" warnings
+  > [experimental]
+  > evolution=createmarkers
+  > EOF
+
   $ cd "$TESTDIR"/..
 
 New errors are not allowed. Warnings are strongly discouraged.
diff --git a/tests/test-check-execute.t b/tests/test-check-execute.t
--- a/tests/test-check-execute.t
+++ b/tests/test-check-execute.t
@@ -1,5 +1,11 @@ 
 #require test-repo execbit
 
+  $ cat >> $HGRCPATH <<EOF
+  > # Silence "obsolete feature not enabled, but markers found" warnings
+  > [experimental]
+  > evolution=createmarkers
+  > EOF
+
   $ cd "`dirname "$TESTDIR"`"
 
 look for python scripts without the execute bit
diff --git a/tests/test-check-module-imports.t b/tests/test-check-module-imports.t
--- a/tests/test-check-module-imports.t
+++ b/tests/test-check-module-imports.t
@@ -1,5 +1,11 @@ 
 #require test-repo
 
+  $ cat >> $HGRCPATH <<EOF
+  > # Silence "obsolete feature not enabled, but markers found" warnings
+  > [experimental]
+  > evolution=createmarkers
+  > EOF
+
   $ import_checker="$TESTDIR"/../contrib/import-checker.py
 
 Run the doctests from the import checker, and make sure
diff --git a/tests/test-check-py3-compat.t b/tests/test-check-py3-compat.t
--- a/tests/test-check-py3-compat.t
+++ b/tests/test-check-py3-compat.t
@@ -1,5 +1,11 @@ 
 #require test-repo
 
+  $ cat >> $HGRCPATH <<EOF
+  > # Silence "obsolete feature not enabled, but markers found" warnings
+  > [experimental]
+  > evolution=createmarkers
+  > EOF
+
   $ cd "$TESTDIR"/..
 
   $ hg files 'set:(**.py)' | sed 's|\\|/|g' | xargs python contrib/check-py3-compat.py
diff --git a/tests/test-check-pyflakes.t b/tests/test-check-pyflakes.t
--- a/tests/test-check-pyflakes.t
+++ b/tests/test-check-pyflakes.t
@@ -1,5 +1,11 @@ 
 #require test-repo pyflakes
 
+  $ cat >> $HGRCPATH <<EOF
+  > # Silence "obsolete feature not enabled, but markers found" warnings
+  > [experimental]
+  > evolution=createmarkers
+  > EOF
+
   $ cd "`dirname "$TESTDIR"`"
 
 run pyflakes on all tracked files ending in .py or without a file ending
diff --git a/tests/test-check-shbang.t b/tests/test-check-shbang.t
--- a/tests/test-check-shbang.t
+++ b/tests/test-check-shbang.t
@@ -1,5 +1,11 @@ 
 #require test-repo
 
+  $ cat >> $HGRCPATH <<EOF
+  > # Silence "obsolete feature not enabled, but markers found" warnings
+  > [experimental]
+  > evolution=createmarkers
+  > EOF
+
   $ cd "`dirname "$TESTDIR"`"
 
 look for python scripts that do not use /usr/bin/env