Patchwork [10,of,12,py3] tests: make a variable for hg binary location in test-check-py3-commands

login
register
mail settings
Submitter Augie Fackler
Date March 12, 2017, 7:49 p.m.
Message ID <1791e8b68cec47943ca9.1489348199@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/19226/
State Accepted
Headers show

Comments

Augie Fackler - March 12, 2017, 7:49 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1489304265 14400
#      Sun Mar 12 03:37:45 2017 -0400
# Node ID 1791e8b68cec47943ca97fc58c45fb69f2fa895c
# Parent  600b4b0de4f01e4cdafb538805cb46e933b8c2a9
tests: make a variable for hg binary location in test-check-py3-commands

The number of which calls in here is starting to get silly.

Patch

diff --git a/tests/test-check-py3-commands.t b/tests/test-check-py3-commands.t
--- a/tests/test-check-py3-commands.t
+++ b/tests/test-check-py3-commands.t
@@ -3,10 +3,11 @@ 
 This test helps in keeping a track on which commands we can run on
 Python 3 and see what kind of errors are coming up.
 The full traceback is hidden to have a stable output.
+  $ HGBIN=`which hg`
 
   $ for cmd in version debuginstall ; do
   >   echo $cmd
-  >   $PYTHON3 `which hg` $cmd 2>&1 2>&1 | tail -1
+  >   $PYTHON3 $HGBIN $cmd 2>&1 2>&1 | tail -1
   > done
   version
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -20,7 +21,7 @@  The full traceback is hidden to have a s
   $ cat >> $HGRCPATH <<EOF
   > %include $TESTTMP/included-hgrc
   > EOF
-  $ $PYTHON3 `which hg` version | tail -1
+  $ $PYTHON3 $HGBIN version | tail -1
   *** failed to import extension babar from imaginary_elephant: *: 'imaginary_elephant' (glob)
   warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.