]> 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)
committerLoic Dachary <ldachary@redhat.com>
Mon, 22 Dec 2014 21:54:20 +0000 (22:54 +0100)
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>
(cherry picked from commit 8ea86dfa7c4a3d7e089cf9d4e49586657875f851)

src/test/ceph-disk.sh

index 7aff8e69c520bb964791692d58ebcf54ef68db5f..7100161ed449f3365d02cb46ba7886dc52678024 100755 (executable)
@@ -84,7 +84,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