simple/12_ctdb_getdebug.sh now recognises output with multi-digit node
numbers.
Sharing the ctdb directory via NFS and testing on a real cluster by
setting CTDB_TEST_REAL_CLUSTER didn't work by default. The fix is to
hack scripts/test_wrap so that it tries to find a valid bin directory
next to the directory containing it is in.
Signed-off-by: Martin Schwenke <martin@meltin.net>
PATH="$(dirname $0):${PATH}"
+f="ctdb_bench"
+if [ ! $(which $f >/dev/null 2>&1) ] ; then
+ d=$(dirname $(dirname $0))/bin
+ [ -x "$d/$f" ] && PATH="$d:$PATH"
+fi
+
. ctdb_test_functions.bash
"$@"
sanity_check_output \
$num_nodes \
- '^Node [[:digit:]] is at debug level [[:alpha:]]+ \([[:digit:]]\)$' \
+ '^Node [[:digit:]]+ is at debug level [[:alpha:]]+ \([[:digit:]]\)$' \
"$out"
try_command_on_node -v 1 "$CTDB getdebug -n all"
nl="
"
while read line ; do
- t=$(echo "$line" | sed -r -e 's@Node [[:digit:]] is at debug level ([[:alpha:]]+) \((-?[[:digit:]])\)$@:\1:\2:@')
+ t=$(echo "$line" | sed -r -e 's@Node [[:digit:]]+ is at debug level ([[:alpha:]]+) \((-?[[:digit:]])\)$@:\1:\2:@')
colons="${colons}${colons:+${nl}}:Name:Level:${nl}${t}"
done <<<"$getdebug_onnode"