aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2016-09-07 08:38:12 +0000
committerliang gao <jean.gaoliang@huawei.com>2016-09-08 09:27:11 +0000
commitf03be607893c66a3cbcd89e465a30f50700c80d0 (patch)
treeb87964ba228917926c3f91ae0dfbd7b29a84b8f3
parent70d1e053d284fc3028cbb939a7a1649046f39904 (diff)
Bugfix:Reporting do not report a status of failure to mongodb
JIRA: YARDSTICK-341 Change-Id: I376d9770838700da452eddf9579415888e9dcf4b Signed-off-by: chenjiankun <chenjiankun1@huawei.com> (cherry picked from commit 684d5eb4d14a7ed79757be95d8a276ace38e70d8)
-rwxr-xr-xtests/ci/yardstick-verify37
1 files changed, 23 insertions, 14 deletions
diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify
index 859c92c94..4b5add71a 100755
--- a/tests/ci/yardstick-verify
+++ b/tests/ci/yardstick-verify
@@ -252,6 +252,26 @@ load_yardstick_image()
echo "Glance image id: $GLANCE_IMAGE_ID"
}
+report(){
+
+ echo
+ echo "========== Reporting Status =========="
+
+ curl -i -H 'content-type: application/json' -X POST -d \
+ "{\"project_name\": \"yardstick\",
+ \"case_name\": \"scenario_status\",
+ \"pod_name\":\"${NODE_NAME}\",
+ \"installer\":\"${INSTALLER_TYPE}\",
+ \"version\":\"${YARDSTICK_BRANCH}\",
+ \"scenario\":\"${DEPLOY_SCENARIO}\",
+ \"description\": \"yardstick ci scenario status\",
+ \"start_date\":\"$2\",
+ \"criteria\":\"$1\",
+ \"stop_date\":\"$3\",
+ \"details\":\"\"}" \
+ ${DISPATCHER_HTTP_TARGET}
+}
+
run_test()
{
echo
@@ -296,7 +316,7 @@ EOF
# Mark the test suite failed but continue
# running the remaining test suites.
- (( failed++ ))
+ (( ++failed ))
fi
if [ ${DISPATCHER_TYPE} = file ]; then
echo "---------------------------"
@@ -318,19 +338,8 @@ EOF
if [ $failed -gt 0 ]; then
scenario_status="FAILED"
fi
- curl -i -H 'content-type: application/json' -X POST -d \
- "{\"project_name\": \"yardstick\",
- \"case_name\": \"scenario_status\",
- \"pod_name\":\"${NODE_NAME}\",
- \"installer\":\"${INSTALLER_TYPE}\",
- \"version\":\"${YARDSTICK_BRANCH}\",
- \"scenario\":\"${DEPLOY_SCENARIO}\",
- \"description\": \"yardstick ci scenario status\",
- \"start_date\":\"${start_date}\",
- \"criteria\":\"${scenario_status}\",
- \"stop_date\":\"${stop_date}\",
- \"details\":\"\"}" \
- ${DISPATCHER_HTTP_TARGET}
+
+ report $scenario_status $start_date $stop_date
if [ $failed -gt 0 ]; then
echo "---------------------------"