Test suite: make time logging only happen on a real cluster, not local daemons.
authorMartin Schwenke <martin@meltin.net>
Tue, 31 Aug 2010 07:28:00 +0000 (17:28 +1000)
committerMartin Schwenke <martin@meltin.net>
Wed, 3 Aug 2011 06:06:40 +0000 (16:06 +1000)
Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/simple/00_ctdb_onnode.sh

index 600ef945487288c72480c37c1da47db566d2c3fa..71b691a3c813ebbc4548bfeea387089e93df7a9f 100755 (executable)
@@ -31,6 +31,8 @@ onnode all onnode all true
 # We're seeing some weirdness with CTDB controls timing out.  We're
 # wondering if time is jumping forward, so this creates a time log on
 # each node that we can examine later if tests fail weirdly.
-echo "Starting time logging on each node..."
-f="/var/log/ctdb.test.time.log"
-onnode -p all "[ -f $f ] || while : ; do date '+%T.%N' ; sleep 1 ; done >$f 2>&1 </dev/null &"  &
+if [ -n "$CTDB_TEST_REAL_CLUSTER" ] ; then
+    echo "Starting time logging on each node..."
+    f="/var/log/ctdb.test.time.log"
+    onnode -p all "[ -f $f ] || while : ; do date '+%T.%N' ; sleep 1 ; done >$f 2>&1 </dev/null &"  &
+fi