[procps] [PATCH] procps-ng : tests, remove which dependency

  • From: Gilles Espinasse <g.esp@xxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Thu, 23 May 2013 23:22:49 +0200

which is a separate package that may not be available and is not yet build on 
Linux from scratch build order.
Instead use posix command -v. command -v  is a builtin working with bash-4.2, 
3.0.25 or even old bash-2.05 or current debian dash

Signed-off-by: Gilles Espinasse <g.esp@xxxxxxx>
---
 testsuite/config/unix.exp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testsuite/config/unix.exp b/testsuite/config/unix.exp
index 2a72c07..700c38e 100644
--- a/testsuite/config/unix.exp
+++ b/testsuite/config/unix.exp
@@ -117,7 +117,7 @@ proc make_testproc { } {
     set sleep_time 300
 
     set testproc_path [ exec mktemp -u ]
-    set sleep_path [ exec which sleep ]
+    set sleep_path [ exec sh -c "command -v sleep" ]
     exec ln -s $sleep_path $testproc_path
     set testproc_comm [ exec basename $testproc_path ]
 
-- 
1.7.10.4


Other related posts: