git.samba.org
/
sahlberg
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa9f79e
)
When testing make the time taken for some operations more obvious.
author
Martin Schwenke
<martin@meltin.net>
Mon, 6 Jul 2009 06:39:08 +0000
(16:39 +1000)
committer
Ronnie Sahlberg
<ronniesahlberg@gmail.com>
Tue, 7 Jul 2009 23:43:45 +0000
(09:43 +1000)
If wait_until() does not timeout, print the time taken for the command
to succeed.
Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/scripts/ctdb_test_functions.bash
patch
|
blob
|
history
diff --git
a/tests/scripts/ctdb_test_functions.bash
b/tests/scripts/ctdb_test_functions.bash
index b271ddea9517b1dc56b79a6bf746434c310211c3..c7aaf6a9c8af862c455d06bdb9f98dcdd41caef3 100644
(file)
--- a/
tests/scripts/ctdb_test_functions.bash
+++ b/
tests/scripts/ctdb_test_functions.bash
@@
-268,14
+268,15
@@
wait_until ()
local timeout="$1" ; shift # "$@" is the command...
echo -n "<${timeout}|"
- while [ $timeout -gt 0 ] ; do
+ local t=$timeout
+ while [ $t -gt 0 ] ; do
if "$@" ; then
- echo
'|'
+ echo
"|$(($timeout - $t))|"
echo "OK"
return 0
fi
echo -n .
- t
imeout=$(($timeou
t - 1))
+ t
=$(($
t - 1))
sleep 1
done