osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42272?usp=email )
Change subject: Print load before and after each test ......................................................................
Print load before and after each test
Make it easier to figure out why tests are failing sporadically by printing the load before and after each test. For example:
------ MGCP_Test.TC_crcx_sdp ------ (14:24:42) load average: 0,41, 0,44, 0,54
Change-Id: If7d82c3c8105b3f3ca3470ba8f525ae8468dbeae --- M _scripts/tcpdump-dumpcap.inc.sh M ttcn3-dumpcap-start.sh M ttcn3-dumpcap-stop.sh M ttcn3-tcpdump-start.sh M ttcn3-tcpdump-stop.sh 5 files changed, 8 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/72/42272/1
diff --git a/_scripts/tcpdump-dumpcap.inc.sh b/_scripts/tcpdump-dumpcap.inc.sh index d033998..d9abd50 100644 --- a/_scripts/tcpdump-dumpcap.inc.sh +++ b/_scripts/tcpdump-dumpcap.inc.sh @@ -13,3 +13,7 @@ rm $1 fi } + +print_date_load() { + echo "($(date +%H:%M:%S)) $(uptime | grep -o "load.*")" +} diff --git a/ttcn3-dumpcap-start.sh b/ttcn3-dumpcap-start.sh index d0b31ad..859a5be 100755 --- a/ttcn3-dumpcap-start.sh +++ b/ttcn3-dumpcap-start.sh @@ -16,7 +16,7 @@ TESTCASE=$1
echo "------ $TESTCASE ------" -date +print_date_load
if [ "$TESTENV_FAST" = 1 ]; then exit 0 diff --git a/ttcn3-dumpcap-stop.sh b/ttcn3-dumpcap-stop.sh index 8c5d347..74ad14b 100755 --- a/ttcn3-dumpcap-stop.sh +++ b/ttcn3-dumpcap-stop.sh @@ -7,7 +7,7 @@ TESTCASE=$1 VERDICT="$2"
-date +print_date_load
if [ x"$VERDICT" = x"pass" ]; then printf "\033[1;32m====== $TESTCASE $VERDICT ======\033[0m\n\n" diff --git a/ttcn3-tcpdump-start.sh b/ttcn3-tcpdump-start.sh index d193b1d..d64aa96 100755 --- a/ttcn3-tcpdump-start.sh +++ b/ttcn3-tcpdump-start.sh @@ -14,7 +14,7 @@ echo "$TESTCASE" > "$TTCN3_PCAP_PATH/.current_test"
echo "------ $TESTCASE ------" -date +print_date_load
if [ "$TESTENV_FAST" = 1 ]; then exit 0 diff --git a/ttcn3-tcpdump-stop.sh b/ttcn3-tcpdump-stop.sh index 41d29ec..64d6ef2 100755 --- a/ttcn3-tcpdump-stop.sh +++ b/ttcn3-tcpdump-stop.sh @@ -8,7 +8,7 @@ TESTCASE=$1 VERDICT="$2"
-date +print_date_load
if [ x"$VERDICT" = x"pass" ]; then printf "\033[1;32m====== $TESTCASE $VERDICT ======\033[0m\n\n"