From 7aa1a2d2054e37fe68c79ea652a496fbf522acaf Mon Sep 17 00:00:00 2001 From: blsaws Date: Thu, 19 May 2016 17:41:42 -0700 Subject: Add test duration and summary JIRA: COPPER-4 Change-Id: I4b04189229c8347b3e9f6cba3710976046afb0c6 Signed-off-by: blsaws --- tests/run.sh | 19 +++++++++++++++++++ tests/smtp_ingress-clean.sh | 5 ++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/tests/run.sh b/tests/run.sh index 2257d88..a1c31a4 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -24,21 +24,40 @@ # $ source install_congress_testserver_1.sh # +start=`date +%s` + echo "============" echo "Test: dmz.sh" echo "============" sh dmz.sh +if (($? == 0)); then dmz="Passed" +else dmz="Failed"; fi sh dmz-clean.sh echo "========================" echo "Test: reserved_subnet.sh" echo "========================" sh reserved_subnet.sh +if (($? == 0)); then reserved_subnet="Passed" +else reserved_subnet="Failed"; fi sh reserved_subnet-clean.sh echo "=====================" echo "Test: smtp_ingress.sh" echo "=====================" sh smtp_ingress.sh +if (($? == 0)); then smtp_ingress="Passed" +else smtp_ingress="Failed"; fi sh smtp_ingress-clean.sh +end=`date +%s` +runtime=$((end-start)) +runtime=$((runtime/60)) +echo "======================" +echo "Test Execution Summary" +echo "======================" +echo "Test Duration = $runtime minutes" +echo "$dmz : dmz.sh" +echo "$reserved_subnet : reserved_subnet.sh" +echo "$smtp_ingress: smtp_ingress.sh" + diff --git a/tests/smtp_ingress-clean.sh b/tests/smtp_ingress-clean.sh index f224ae6..898f4df 100644 --- a/tests/smtp_ingress-clean.sh +++ b/tests/smtp_ingress-clean.sh @@ -24,7 +24,10 @@ # After test, cleanup with # $ sh dmz-clean.sh -if [ $1 == "debug" ]; then set -x #echo on +if [ $# -eq 1 ]; then + if [ $1 == "debug" ]; then + set -x #echo on + fi fi source /opt/copper/admin-openrc.sh -- cgit 1.2.3-korg