Patchwork test: don't put $BINDIR in $PATH for test-merge-tools.t

login
register
mail settings
Submitter Julien Cristau
Date Nov. 29, 2019, 6:14 p.m.
Message ID <558f7585afcb7d884c8c.1575051286@tomate.cristau.org>
Download mbox | patch
Permalink /patch/43535/
State Accepted
Headers show

Comments

Julien Cristau - Nov. 29, 2019, 6:14 p.m.
# HG changeset patch
# User Julien Cristau <jcristau@debian.org>
# Date 1575049799 -3600
#      Fri Nov 29 18:49:59 2019 +0100
# Branch stable
# Node ID 558f7585afcb7d884c8c6fbc91c6dba843981235
# Parent  371765e775a2cb4c4b41eed10dbee0ceee8ab1f9
test: don't put $BINDIR in $PATH for test-merge-tools.t

We call $BINDIR/hg explicitly anyway, so don't need it in $PATH.  This
fixes failures when running the test --with-hg=/usr/bin/hg, where we
pick up /usr/bin/false as merge tool when we expected not to find it.
Yuya Nishihara - Nov. 30, 2019, 4:33 a.m.
On Fri, 29 Nov 2019 19:14:46 +0100, Julien Cristau wrote:
> # HG changeset patch
> # User Julien Cristau <jcristau@debian.org>
> # Date 1575049799 -3600
> #      Fri Nov 29 18:49:59 2019 +0100
> # Branch stable
> # Node ID 558f7585afcb7d884c8c6fbc91c6dba843981235
> # Parent  371765e775a2cb4c4b41eed10dbee0ceee8ab1f9
> test: don't put $BINDIR in $PATH for test-merge-tools.t

Queued for stable, thanks.

Patch

diff --git a/tests/test-merge-tools.t b/tests/test-merge-tools.t
--- a/tests/test-merge-tools.t
+++ b/tests/test-merge-tools.t
@@ -67,17 +67,17 @@  default is internal merge:
   $ beforemerge
   [merge-tools]
   # hg update -C 1
 
 hg merge -r 2
 override $PATH to ensure hgmerge not visible; use $PYTHON in case we're
 running from a devel copy, not a temp installation
 
-  $ PATH="$BINDIR:/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
+  $ PATH="/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
   merging f
   warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ aftermerge
   # cat f
   <<<<<<< working copy: ef83787e2614 - test: revision 1
@@ -116,31 +116,31 @@  simplest hgrc using false for merge:
   U f
 
 #if unix-permissions
 
 unexecutable file in $PATH shouldn't be found:
 
   $ echo "echo fail" > false
   $ hg up -qC 1
-  $ PATH="`pwd`:$BINDIR:/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
+  $ PATH="`pwd`:/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
   merging f
   warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ rm false
 
 #endif
 
 executable directory in $PATH shouldn't be found:
 
   $ mkdir false
   $ hg up -qC 1
-  $ PATH="`pwd`:$BINDIR:/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
+  $ PATH="`pwd`:/usr/sbin" "$PYTHON" "$BINDIR"/hg merge -r 2
   merging f
   warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
   use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
   [1]
   $ rmdir false
 
 true with higher .priority gets precedence: