rename log files after each test
authorMichal Voců <michal@ruk.cuni.cz>
Mon, 24 Aug 2009 15:31:43 +0000 (15:31 +0000)
committerMichal Voců <michal@ruk.cuni.cz>
Mon, 24 Aug 2009 15:31:43 +0000 (15:31 +0000)
org.glite.lb.common/src/perftest_common.sh

index b876113..3221ed8 100644 (file)
@@ -168,6 +168,7 @@ run_test()
        # if there are no new lines in the log, give it some time
        [[ $linesbefore -eq $linesafter ]] && sleep 5
        linesafter=`grep PERFTEST $CONSUMER_LOG|wc -l`
+       [[ $DEBUG -gt 0 ]] && echo "Lines before " $linesbefore ", after " $linesafter
        if [[ $linesbefore -eq $linesafter ]]
        then
            [[ $DEBUG -gt 0 ]] && echo "Test failed - consumer did not report timestamp."
@@ -182,6 +183,9 @@ run_test()
        i=$(($i + 1))
     done
     # clean up
+    mv $PRODUCER_LOG ${PRODUCER_LOG}.${PERFTEST_NAME}
+    mv $CONSUMER_LOG ${CONSUMER_LOG}.${PERFTEST_NAME}
+    mv $COMPONENT_LOG ${COMPONENT_LOG}.${PERFTEST_NAME}
     shutdown $COMPONENT_PID
     shutdown $CONSUMER_PID
     [[ $DEBUG -gt 1 ]] && killall tail