aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2016-06-02 21:18:54 +0200
committerJan Gelety <jgelety@cisco.com>2016-06-02 22:59:53 +0200
commitf244731483d7a52cf73c5bcaa4fbefce1297191b (patch)
tree644a1a8052199bb5ce5e05079f44fe36a2a12f65
parentbca7bcede75d4fa3713a2317b87820d4d3439b7b (diff)
Final result must be combination of all test runs in vpp-verify-weekly job.
- log clear final result based on results of all runs - exit script with return code corresponding to final result Change-Id: If504b4c45a947502806011db9290ff41e4299490 Signed-off-by: Jan Gelety <jgelety@cisco.com>
-rw-r--r--bootstrap-vpp-verify-weekly.sh59
1 files changed, 58 insertions, 1 deletions
diff --git a/bootstrap-vpp-verify-weekly.sh b/bootstrap-vpp-verify-weekly.sh
index 90ff2b7cd0..6142cb2a5b 100644
--- a/bootstrap-vpp-verify-weekly.sh
+++ b/bootstrap-vpp-verify-weekly.sh
@@ -148,9 +148,12 @@ virtualenv --system-site-packages env
echo pip install
pip install -r requirements.txt
-
# There are used three iterations of tests there to check
# the stability and reliability of the results
+
+RC=0
+MORE_FAILS=0
+
for test_set in 1 2 3
do
echo
@@ -163,8 +166,62 @@ do
--noncritical EXPECTED_FAILING \
--output log_test_set${test_set} \
tests/
+ PARTIAL_RC=$(echo $?)
+ if [ ${PARTIAL_RC} -eq 250 ]; then
+ MORE_FAILS=1
+ fi
+ RC=$((RC+PARTIAL_RC))
done
+# Log the final result
+if [ ${RC} -eq 0 ]; then
+ set +x
+ echo
+ echo "=============================================================================="
+ echo "Final result of all test loops: | PASS |"
+ echo "All critical tests have passed."
+ echo "=============================================================================="
+ echo
+ set -x
+elif [ ${MORE_FAILS} -eq 0 ]; then
+ if [ ${RC} -eq 1 ]; then
+ HLP_STR="test has"
+ else
+ HLP_STR="tests have"
+ fi
+ set +x
+ echo
+ echo "=============================================================================="
+ echo "Final result of all test loops: | FAIL |"
+ echo "${RC} critical ${HLP_STR} failed."
+ echo "=============================================================================="
+ echo
+ set -x
+else
+ set +x
+ echo
+ echo "=============================================================================="
+ echo "Final result of all test loops: | FAIL |"
+ echo "More then 250 critical tests have failed in one test loop."
+ echo "=============================================================================="
+ echo
+ set -x
+fi
+
+echo Post-processing test data...
+
+# Rebot output post-processing
rebot --output output.xml ./log_test_set1.xml ./log_test_set2.xml ./log_test_set3.xml
+# Remove unnecessary log files
rm -f ./log_test_set1.xml ./log_test_set2.xml ./log_test_set3.xml
+
+echo Post-processing finished.
+
+if [ ${RC} -eq 0 ]; then
+ RETURN_STATUS=0
+else
+ RETURN_STATUS=1
+fi
+
+exit ${RETURN_STATUS}