summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorblsaws <bryan.sullivan@att.com>2016-05-19 17:41:42 -0700
committerblsaws <bryan.sullivan@att.com>2016-05-19 17:41:42 -0700
commit7aa1a2d2054e37fe68c79ea652a496fbf522acaf (patch)
tree53cdd2e4e5f5153eb4d7e5877b2eca3edb1983cc /tests
parenteae00dcc98ed5d2c9fa81f76e6d4008a44f96bf4 (diff)
Add test duration and summary
JIRA: COPPER-4 Change-Id: I4b04189229c8347b3e9f6cba3710976046afb0c6 Signed-off-by: blsaws <bryan.sullivan@att.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run.sh19
-rw-r--r--tests/smtp_ingress-clean.sh5
2 files changed, 23 insertions, 1 deletions
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