Patchwork [1,of,2,evolve-ext] tests: specify a path to the evolve and topic extensions

login
register
mail settings
Submitter Matt Harbison
Date Jan. 4, 2019, 5:13 a.m.
Message ID <1c6f2cc21682164dde57.1546578836@Envy>
Download mbox | patch
Permalink /patch/37447/
State New
Headers show

Comments

Matt Harbison - Jan. 4, 2019, 5:13 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1546576030 18000
#      Thu Jan 03 23:27:10 2019 -0500
# Node ID 1c6f2cc21682164dde57f581f55e2affb0c1d709
# Parent  708bf337a93e8e136fdf25aabf927ee44f3460ad
tests: specify a path to the evolve and topic extensions

Apparently, this was the cause of most (but not all) of the test failures on
Windows.  It seems to have been picking up 8.3.1 in the default path.  Among
other things, it was complaining about overwriting 'experimental.auto-publish'
and `hg split` not having '--no-interactive'.

There are two instances of `evolve=` style loading left over in
test-evolve-serveronly-legacy.t and test-evolve-serveronly-bundle2.t, in case
anybody wants to try to figure this out.  It seems evident that it was intended
to test this style loading, because the next line tests loading with a specific
path.
Anton Shestakov - Jan. 4, 2019, 10:32 a.m.
On Fri, 04 Jan 2019 00:13:56 -0500
Matt Harbison <mharbison72@gmail.com> wrote:

> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1546576030 18000
> #      Thu Jan 03 23:27:10 2019 -0500
> # Node ID 1c6f2cc21682164dde57f581f55e2affb0c1d709
> # Parent  708bf337a93e8e136fdf25aabf927ee44f3460ad
> tests: specify a path to the evolve and topic extensions
> 
> Apparently, this was the cause of most (but not all) of the test failures on
> Windows.  It seems to have been picking up 8.3.1 in the default path.

tests/testlib/pythonpath.sh exists to solve exactly this, and it does it
by simply prepending $TESTDIR/.. to $PATH. It unfortunately looks like
doesn't do its job on Windows very well. But the proper fix to the
issue this patch addresses would be to modify pythonpath.sh for
Windows (or rewriting it in Python to be more cross-platform?).

Patch

diff --git a/tests/test-discovery-obshashrange-cache.t b/tests/test-discovery-obshashrange-cache.t
--- a/tests/test-discovery-obshashrange-cache.t
+++ b/tests/test-discovery-obshashrange-cache.t
@@ -7,7 +7,7 @@ 
 
   $ cat << EOF >> $HGRCPATH
   > [extensions]
-  > hgext3rd.evolve =
+  > hgext3rd.evolve = $TESTDIR/../hgext3rd/evolve
   > blackbox =
   > [defaults]
   > blackbox = -l 100
diff --git a/tests/test-discovery-obshashrange.t b/tests/test-discovery-obshashrange.t
--- a/tests/test-discovery-obshashrange.t
+++ b/tests/test-discovery-obshashrange.t
@@ -5,7 +5,7 @@ 
 
   $ cat << EOF >> $HGRCPATH
   > [extensions]
-  > hgext3rd.evolve =
+  > hgext3rd.evolve = $TESTDIR/../hgext3rd/evolve
   > blackbox =
   > [defaults]
   > blackbox = -l 100
diff --git a/tests/test-evolve-cycles.t b/tests/test-evolve-cycles.t
--- a/tests/test-evolve-cycles.t
+++ b/tests/test-evolve-cycles.t
@@ -10,7 +10,7 @@ 
   > [phases]
   > publish=False
   > [extensions]
-  > evolve =
+  > evolve = $TESTDIR/../hgext3rd/evolve
   > EOF
 
 Test with cycle
diff --git a/tests/test-evolve-effectflags.t b/tests/test-evolve-effectflags.t
--- a/tests/test-evolve-effectflags.t
+++ b/tests/test-evolve-effectflags.t
@@ -10,7 +10,7 @@ 
   > [phases]
   > publish=False
   > [extensions]
-  > evolve =
+  > evolve = $TESTDIR/../hgext3rd/evolve
   > rebase =
   > [experimental]
   > evolution.effect-flags = 1
diff --git a/tests/test-evolve-issue5966.t b/tests/test-evolve-issue5966.t
--- a/tests/test-evolve-issue5966.t
+++ b/tests/test-evolve-issue5966.t
@@ -11,7 +11,7 @@ 
   > [alias]
   > glog = log -GT "{rev}: {desc}"
   > [extensions]
-  > evolve=
+  > evolve=$TESTDIR/../hgext3rd/evolve
   > EOF
 
   $ touch a
diff --git a/tests/test-evolve-obshistory-complex.t b/tests/test-evolve-obshistory-complex.t
--- a/tests/test-evolve-obshistory-complex.t
+++ b/tests/test-evolve-obshistory-complex.t
@@ -8,7 +8,7 @@ 
   > [phases]
   > publish=False
   > [extensions]
-  > evolve =
+  > evolve = $TESTDIR/../hgext3rd/evolve
   > EOF
 
 Test obslog with split + fold + split
diff --git a/tests/test-evolve-serveronly-bundle2.t b/tests/test-evolve-serveronly-bundle2.t
--- a/tests/test-evolve-serveronly-bundle2.t
+++ b/tests/test-evolve-serveronly-bundle2.t
@@ -32,7 +32,7 @@ 
 setup repo
 
   $ echo "[extensions]" >> ./server/.hg/hgrc
-  $ echo "evolve.serveronly=" >> ./server/.hg/hgrc
+  $ echo "evolve.serveronly= $TESTDIR/../hgext3rd/evolve/serveronly.py" >> ./server/.hg/hgrc
   $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
   $ cat hg.pid >> $DAEMON_PIDS
 
@@ -42,7 +42,7 @@ 
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cat ./errors.log
   $ echo "[extensions]" >> ./client/.hg/hgrc
-  $ echo "evolve=" >> ./client/.hg/hgrc
+  $ echo "evolve= $TESTDIR/../hgext3rd/evolve" >> ./client/.hg/hgrc
   $ echo "[paths]" >> ./client/.hg/hgrc
   $ echo "ssh=ssh://user@dummy/server/" >> ./client/.hg/hgrc
   $ cp -r client other
diff --git a/tests/test-evolve-serveronly-legacy.t b/tests/test-evolve-serveronly-legacy.t
--- a/tests/test-evolve-serveronly-legacy.t
+++ b/tests/test-evolve-serveronly-legacy.t
@@ -34,7 +34,7 @@ 
 setup repo
 
   $ echo "[extensions]" >> ./server/.hg/hgrc
-  $ echo "evolve.serveronly=" >> ./server/.hg/hgrc
+  $ echo "evolve.serveronly= $TESTDIR/../hgext3rd/evolve/serveronly.py" >> ./server/.hg/hgrc
   $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log --traceback
   $ cat hg.pid >> $DAEMON_PIDS
 
@@ -44,7 +44,7 @@ 
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cat ./errors.log
   $ echo "[extensions]" >> ./client/.hg/hgrc
-  $ echo "evolve=" >> ./client/.hg/hgrc
+  $ echo "evolve= $TESTDIR/../hgext3rd/evolve" >> ./client/.hg/hgrc
   $ cp -r client other
 
 Smoke testing
diff --git a/tests/test-evolve-templates.t b/tests/test-evolve-templates.t
--- a/tests/test-evolve-templates.t
+++ b/tests/test-evolve-templates.t
@@ -10,7 +10,7 @@ 
   > [phases]
   > publish=False
   > [extensions]
-  > evolve =
+  > evolve = $TESTDIR/../hgext3rd/evolve
   > [alias]
   > tlog = log -G -T '{node|short}\
   >     {if(precursors, "\n  Precursors: {precursors}")}\
diff --git a/tests/test-fold.t b/tests/test-fold.t
--- a/tests/test-fold.t
+++ b/tests/test-fold.t
@@ -6,7 +6,7 @@ 
   > [defaults]
   > fold=-d "0 0"
   > [extensions]
-  > evolve=
+  > evolve= $TESTDIR/../hgext3rd/evolve
   > [ui]
   > logtemplate = '{rev} - {node|short} {desc|firstline} [{author}] ({phase}) {bookmarks}\n'
   > EOF
diff --git a/tests/test-issue-5720.t b/tests/test-issue-5720.t
--- a/tests/test-issue-5720.t
+++ b/tests/test-issue-5720.t
@@ -15,7 +15,7 @@ 
   > [phases]
   > publish=False
   > [extensions]
-  > evolve =
+  > evolve = $TESTDIR/../hgext3rd/evolve
   > EOF
 
 Test
diff --git a/tests/test-issue-6028.t b/tests/test-issue-6028.t
--- a/tests/test-issue-6028.t
+++ b/tests/test-issue-6028.t
@@ -14,8 +14,8 @@ 
   > [phases]
   > publish=False
   > [extensions]
-  > evolve =
-  > topic =
+  > evolve = $TESTDIR/../hgext3rd/evolve
+  > topic = $TESTDIR/../hgext3rd/topic
   > EOF
 
 Test
diff --git a/tests/test-pullbundle.t b/tests/test-pullbundle.t
--- a/tests/test-pullbundle.t
+++ b/tests/test-pullbundle.t
@@ -3,7 +3,7 @@ 
   $ cat << EOF >> $HGRCPATH
   > [extensions]
   > # evolve is providing the stable range code
-  > evolve=
+  > evolve= $TESTDIR/../hgext3rd/evolve
   > pullbundle=
   > [experimental]
   > obshashrange.warm-cache=yes
diff --git a/tests/test-rewind.t b/tests/test-rewind.t
--- a/tests/test-rewind.t
+++ b/tests/test-rewind.t
@@ -10,7 +10,7 @@ 
   > [phases]
   > publish=False
   > [extensions]
-  > evolve =
+  > evolve = $TESTDIR/../hgext3rd/evolve
   > EOF
 
   $ hg init rewind-testing-base
diff --git a/tests/test-split.t b/tests/test-split.t
--- a/tests/test-split.t
+++ b/tests/test-split.t
@@ -20,7 +20,7 @@ 
   > [ui]
   > interactive = true
   > [extensions]
-  > evolve =
+  > evolve = $TESTDIR/../hgext3rd/evolve
   > EOF
   $ mkcommit() {
   >    echo "$1" > "$1"
diff --git a/tests/test-stablerange-branchpoint.t b/tests/test-stablerange-branchpoint.t
--- a/tests/test-stablerange-branchpoint.t
+++ b/tests/test-stablerange-branchpoint.t
@@ -5,7 +5,7 @@ 
 
   $ cat << EOF >> $HGRCPATH
   > [extensions]
-  > hgext3rd.evolve =
+  > hgext3rd.evolve = $TESTDIR/../hgext3rd/evolve
   > [ui]
   > logtemplate = "{rev} {node|short} {desc} {tags}\n"
   > [defaults]
diff --git a/tests/test-stablerange.t b/tests/test-stablerange.t
--- a/tests/test-stablerange.t
+++ b/tests/test-stablerange.t
@@ -5,7 +5,7 @@ 
 
   $ cat << EOF >> $HGRCPATH
   > [extensions]
-  > hgext3rd.evolve =
+  > hgext3rd.evolve = $TESTDIR/../hgext3rd/evolve
   > [ui]
   > logtemplate = "{rev} {node|short} {desc} {tags}\n"
   > [defaults]
diff --git a/tests/test-stablesort-branchpoint-criss-cross.t b/tests/test-stablesort-branchpoint-criss-cross.t
--- a/tests/test-stablesort-branchpoint-criss-cross.t
+++ b/tests/test-stablesort-branchpoint-criss-cross.t
@@ -5,7 +5,7 @@ 
 
   $ cat << EOF >> $HGRCPATH
   > [extensions]
-  > hgext3rd.evolve =
+  > hgext3rd.evolve = $TESTDIR/../hgext3rd/evolve
   > [ui]
   > logtemplate = "{rev} {node|short} {desc} {tags}\n"
   > [alias]
diff --git a/tests/test-stablesort-branchpoint.t b/tests/test-stablesort-branchpoint.t
--- a/tests/test-stablesort-branchpoint.t
+++ b/tests/test-stablesort-branchpoint.t
@@ -5,7 +5,7 @@ 
 
   $ cat << EOF >> $HGRCPATH
   > [extensions]
-  > hgext3rd.evolve =
+  > hgext3rd.evolve = $TESTDIR/../hgext3rd/evolve
   > [ui]
   > logtemplate = "{rev} {node|short} {desc} {tags}\n"
   > [alias]
diff --git a/tests/test-stablesort-criss-cross.t b/tests/test-stablesort-criss-cross.t
--- a/tests/test-stablesort-criss-cross.t
+++ b/tests/test-stablesort-criss-cross.t
@@ -5,7 +5,7 @@ 
 
   $ cat << EOF >> $HGRCPATH
   > [extensions]
-  > hgext3rd.evolve =
+  > hgext3rd.evolve = $TESTDIR/../hgext3rd/evolve
   > [ui]
   > logtemplate = "{rev} {node|short} {desc} {tags}\n"
   > [alias]
diff --git a/tests/test-stablesort.t b/tests/test-stablesort.t
--- a/tests/test-stablesort.t
+++ b/tests/test-stablesort.t
@@ -5,7 +5,7 @@ 
 
   $ cat << EOF >> $HGRCPATH
   > [extensions]
-  > hgext3rd.evolve =
+  > hgext3rd.evolve = $TESTDIR/../hgext3rd/evolve
   > [ui]
   > logtemplate = "{rev} {node|short} {desc} {tags}\n"
   > [alias]
diff --git a/tests/test-topic-stack.t b/tests/test-topic-stack.t
--- a/tests/test-topic-stack.t
+++ b/tests/test-topic-stack.t
@@ -901,7 +901,7 @@ 
   s2@ c_G (current)
   s1: c_D
   s0^ c_A (base)
-  $ hg --config extensions.evolve=  --config ui.interactive=yes split << EOF
+  $ hg --config extensions.evolve=$TESTDIR/../hgext3rd/evolve --config ui.interactive=yes split << EOF
   > y
   > y
   > n
@@ -924,7 +924,7 @@ 
   
   continue splitting? [Ycdq?] c
 
-  $ hg --config extensions.evolve= obslog --all
+  $ hg --config extensions.evolve=$TESTDIR/../hgext3rd/evolve obslog --all
   o  dde94df880e9 (21) c_G
   |
   | @  e7ea874afbd5 (22) c_G
diff --git a/tests/test-topic-tutorial.t b/tests/test-topic-tutorial.t
--- a/tests/test-topic-tutorial.t
+++ b/tests/test-topic-tutorial.t
@@ -11,7 +11,7 @@ 
   > [experimental]
   > evolution=all
   > [extensions]
-  > evolve=
+  > evolve= $TESTDIR/../hgext3rd/evolve
   > EOF
 
   $ hg init server
diff --git a/tests/test-uncommit-interactive.t b/tests/test-uncommit-interactive.t
--- a/tests/test-uncommit-interactive.t
+++ b/tests/test-uncommit-interactive.t
@@ -10,7 +10,7 @@ 
   > [ui]
   > interactive = true
   > [extensions]
-  > evolve =
+  > evolve = $TESTDIR/../hgext3rd/evolve
   > EOF
 
   $ glog() {
diff --git a/tests/testlib/obshistory_setup.sh b/tests/testlib/obshistory_setup.sh
--- a/tests/testlib/obshistory_setup.sh
+++ b/tests/testlib/obshistory_setup.sh
@@ -6,7 +6,7 @@ 
 [phases]
 publish=False
 [extensions]
-evolve =
+evolve = $TESTDIR/../hgext3rd/evolve
 [experimental]
 evolution.effect-flags = yes
 EOF
diff --git a/tests/testlib/push-checkheads-util.sh b/tests/testlib/push-checkheads-util.sh
--- a/tests/testlib/push-checkheads-util.sh
+++ b/tests/testlib/push-checkheads-util.sh
@@ -14,7 +14,7 @@ 
 [extensions]
 # we need to strip some changeset for some test cases
 strip=
-evolve=
+evolve= $TESTDIR/../hgext3rd/evolve
 EOF
 
 setuprepos() {
diff --git a/tests/testlib/topic_setup.sh b/tests/testlib/topic_setup.sh
--- a/tests/testlib/topic_setup.sh
+++ b/tests/testlib/topic_setup.sh
@@ -12,5 +12,5 @@ 
 
 [extensions]
 rebase=
-topic=
+topic=$TESTDIR/../hgext3rd/topic
 EOF