From: Sami Kerola Date: Mon, 16 Apr 2012 18:25:23 +0000 (+0200) Subject: tests: do not assume sleep command path X-Git-Tag: v3.3.3~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=beab98a036faefbe4c8b7922c9cc6a1c32e76284;p=procps-ng tests: do not assume sleep command path The testsuite failed on archlinux which has sleep in /usr/bin/ instead of /bin/ directory. This commit will make expect to use $PATH to determine where sleep is. Signed-off-by: Sami Kerola --- diff --git a/testsuite/config/unix.exp b/testsuite/config/unix.exp index 6b95655f..508fcd85 100644 --- a/testsuite/config/unix.exp +++ b/testsuite/config/unix.exp @@ -116,12 +116,13 @@ proc make_testproc { } { global testproc_path testproc_comm testproc1_pid testproc2_pid set testproc_path [ exec mktemp -u ] - exec ln -s "/bin/sleep" $testproc_path + set sleep_path [ exec which sleep ] + exec ln -s $sleep_path $testproc_path set testproc_comm [ exec basename $testproc_path ] spawn readlink $testproc_path expect { - -re "^/bin/sleep\\s*$" { } + -re "^$sleep_path\\s*$" { } timeout { perror "test proc does not link to sleep 1" } eof { perror "test proc does not link to sleep 1" } }