summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/onnode/scripts
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2012-04-20 16:43:17 +1000
committerMartin Schwenke <martin@meltin.net>2012-04-27 15:40:43 +1000
commit6757ad62f4cda14066789989fb002cee7c009cde (patch)
tree2ff3b399f75896761dfb5f4b8be7f0d03dfc6fb8 /ctdb/tests/onnode/scripts
parent6764b7b33e0a8f61b51bb4c666205147744917c7 (diff)
downloadsamba-6757ad62f4cda14066789989fb002cee7c009cde.tar.gz
samba-6757ad62f4cda14066789989fb002cee7c009cde.tar.xz
samba-6757ad62f4cda14066789989fb002cee7c009cde.zip
tests: Make run_tests -X more flexible - it now works with onnode
Hardcoding "sh -x" is suboptimal because some scripts, like onnode, require bash. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 246809af64c03d26288abff5907ed46614e72b15)
Diffstat (limited to 'ctdb/tests/onnode/scripts')
-rw-r--r--ctdb/tests/onnode/scripts/local.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/ctdb/tests/onnode/scripts/local.sh b/ctdb/tests/onnode/scripts/local.sh
index d6dd41c293..35fd013540 100644
--- a/ctdb/tests/onnode/scripts/local.sh
+++ b/ctdb/tests/onnode/scripts/local.sh
@@ -67,7 +67,12 @@ simple_test ()
_sort="sort"
fi
- _out=$("$@" 2>&1)
+ if $TEST_COMMAND_TRACE ; then
+ _onnode=$(which "$1") ; shift
+ _out=$(bash -x "$_onnode" "$@" 2>&1)
+ else
+ _out=$("$@" 2>&1)
+ fi
_rc=$?
_out=$(echo "$_out" | $_sort )