aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2019-02-26 05:03:22 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2019-03-07 16:33:03 +0100
commitced8acf30581c36745bdf22d68acd802aa5a25c9 (patch)
tree16e880837c206b0c79ea9f2be1f7f059ebcc7fe2
parentc574829208afe0309948bccf8e2c580b0e3ecf56 (diff)
log time in tcpdump-start and -stop.sh
Also log the testcase name in tcpdump-start.sh. The output now looks like ------ MSC_Tests.TC_mo_cc_bssmap_clear ------ Thu Mar 7 13:21:00 UTC 2019 [...] Thu Mar 7 13:21:04 UTC 2019 ====== MSC_Tests.TC_mo_cc_bssmap_clear pass ====== The reason to log start and end dates came up like this: I noticed a segfault in a tested program at a specific time. From the timestamp I tried to find out which of the tests saw the failure. (After a segfault, all subsequent tests run and fail, but it is not obvious which failure occured because of a segfault, and which ones just normally failed before that.) Looking at the timestamps of the log files didn't help, because the ttcn3_logmerge touched those after the tests completed. So the only way is to cat each individual log file and find the timestamp. So this adds an overview of the timestamps without needing to open log files. Change-Id: I0832d9b5df599baad5dec8d3a993481b4286fbb3
-rwxr-xr-xttcn3-tcpdump-start.sh3
-rwxr-xr-xttcn3-tcpdump-stop.sh2
2 files changed, 5 insertions, 0 deletions
diff --git a/ttcn3-tcpdump-start.sh b/ttcn3-tcpdump-start.sh
index 395941d4..747002be 100755
--- a/ttcn3-tcpdump-start.sh
+++ b/ttcn3-tcpdump-start.sh
@@ -4,6 +4,9 @@ PIDFILE=/tmp/tcpdump.pid
TCPDUMP=/usr/sbin/tcpdump
TESTCASE=$1
+echo "------ $TESTCASE ------"
+date
+
if [ "z$TTCN3_PCAP_PATH" = "z" ]; then
TTCN3_PCAP_PATH=/tmp
fi
diff --git a/ttcn3-tcpdump-stop.sh b/ttcn3-tcpdump-stop.sh
index 94048411..baabefe4 100755
--- a/ttcn3-tcpdump-stop.sh
+++ b/ttcn3-tcpdump-stop.sh
@@ -4,6 +4,8 @@ PIDFILE=/tmp/tcpdump.pid
TESTCASE=$1
VERDICT="$2"
+date
+
if [ x"$VERDICT" = x"pass" ]; then
echo "\033[1;32m====== $TESTCASE $VERDICT ======\033[0m"
else