From: Dan Mick Date: Wed, 30 Jul 2014 21:48:28 +0000 (-0700) Subject: qa/workunits/cephtool/test_daemon.sh: allow local ceph command X-Git-Tag: v0.85~124^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=97a8d5a9fdbd3a25cc922c242ee57da58c57d0bc;p=ceph.git qa/workunits/cephtool/test_daemon.sh: allow local ceph command --- diff --git a/qa/workunits/cephtool/test_daemon.sh b/qa/workunits/cephtool/test_daemon.sh index f598708d019a..0e7331d103c7 100755 --- a/qa/workunits/cephtool/test_daemon.sh +++ b/qa/workunits/cephtool/test_daemon.sh @@ -10,21 +10,24 @@ expect_false() echo note: assuming mon.a is on the currenet host -sudo ceph daemon mon.a version | grep version +# can set to 'sudo ./ceph' to execute tests from current dir for development +CEPH=${CEPH:-'sudo ceph'} + +${CEPH} daemon mon.a version | grep version # get debug_ms setting and strip it, painfully for reuse -old_ms=$(sudo ceph daemon mon.a config get debug_ms | grep debug_ms | \ - sed -e 's/.*: //' -e 's/["\}\\]//g') -sudo ceph daemon mon.a config set debug_ms 13 -new_ms=$(sudo ceph daemon mon.a config get debug_ms | grep debug_ms | \ - sed -e 's/.*: //' -e 's/["\}\\]//g') +old_ms=$(${CEPH} daemon mon.a config get debug_ms | \ + grep debug_ms | sed -e 's/.*: //' -e 's/["\}\\]//g') +${CEPH} daemon mon.a config set debug_ms 13 +new_ms=$(${CEPH} daemon mon.a config get debug_ms | \ + grep debug_ms | sed -e 's/.*: //' -e 's/["\}\\]//g') [ "$new_ms" = "13/13" ] -sudo ceph daemon mon.a config set debug_ms $old_ms -new_ms=$(sudo ceph daemon mon.a config get debug_ms | grep debug_ms | \ - sed -e 's/.*: //' -e 's/["\}\\]//g') +${CEPH} daemon mon.a config set debug_ms $old_ms +new_ms=$(${CEPH} daemon mon.a config get debug_ms | \ + grep debug_ms | sed -e 's/.*: //' -e 's/["\}\\]//g') [ "$new_ms" = "$old_ms" ] # unregistered/non-existent command -expect_false sudo ceph daemon mon.a bogus_command_blah foo +expect_false ${CEPH} daemon mon.a bogus_command_blah foo echo OK