Patchwork D11983: test: do not use `which` to find an exec path in the test

login
register
mail settings
Submitter phabricator
Date Jan. 12, 2022, 2:08 p.m.
Message ID <differential-rev-PHID-DREV-mmpg23plj5smjdrkzewf-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50308/
State New
Headers show

Comments

phabricator - Jan. 12, 2022, 2:08 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Posix is deprecated `which` in favor of `command -v`… which does not provide the same feature.
  Debian is warning about this deprecation and this get annoying.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11983

AFFECTED FILES
  tests/test-run-tests.t

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t
--- a/tests/test-run-tests.t
+++ b/tests/test-run-tests.t
@@ -21,7 +21,7 @@ 
 error paths
 
 #if symlink
-  $ ln -s `which true` hg
+  $ ln -s "/"bin"/"true hg
   $ "$PYTHON" $TESTDIR/run-tests.py --with-hg=./hg
   ^warning: --with-hg should specify an hg script, not: (true|coreutils)$ (re)
   running 0 tests using 0 parallel processes