From beab98a036faefbe4c8b7922c9cc6a1c32e76284 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Mon, 16 Apr 2012 20:25:23 +0200 Subject: [PATCH] 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 --- testsuite/config/unix.exp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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" } }