]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/ceph-disk.sh: resolve symlinks before check
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 4 Sep 2014 10:23:27 +0000 (12:23 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 16 Sep 2014 10:00:04 +0000 (12:00 +0200)
Make sure symlinks are resolved in command_fixture()
before compare result of which command and the current
path.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/ceph-disk.sh

index 49ede4821ab69340f75321a7f3575b008f033c82..bdd705b4b90b0c3e343c64d69a56af27ce94f857 100755 (executable)
@@ -85,7 +85,7 @@ function kill_daemons() {
 function command_fixture() {
     local command=$1
 
-    [ $(which $command) = ./$command ] || [ $(which $command) = $(pwd)/$command ] || return 1
+    [ $(which $command) = ./$command ] || [ $(which $command) = `readlink -f $(pwd)/$command` ] || return 1
 
     cat > $DIR/$command <<EOF
 #!/bin/bash