diff options
Diffstat (limited to 'tests/ci')
-rw-r--r-- | tests/ci/docker/yardstick-ci/Dockerfile | 1 | ||||
-rwxr-xr-x | tests/ci/prepare_env.sh | 5 | ||||
-rw-r--r-- | tests/ci/scp_storperf_admin-rc.sh | 5 | ||||
-rwxr-xr-x | tests/ci/yardstick-verify | 30 |
4 files changed, 36 insertions, 5 deletions
diff --git a/tests/ci/docker/yardstick-ci/Dockerfile b/tests/ci/docker/yardstick-ci/Dockerfile index 684f47122..da755d11d 100644 --- a/tests/ci/docker/yardstick-ci/Dockerfile +++ b/tests/ci/docker/yardstick-ci/Dockerfile @@ -20,6 +20,7 @@ ENV RELENG_REPO_DIR ${REPOS_DIR}/releng RUN apt-get update && apt-get install -y \ wget \ + expect \ curl \ git \ sshpass \ diff --git a/tests/ci/prepare_env.sh b/tests/ci/prepare_env.sh index 35118b12c..d9f8257ae 100755 --- a/tests/ci/prepare_env.sh +++ b/tests/ci/prepare_env.sh @@ -56,6 +56,11 @@ export EXTERNAL_NETWORK INSTALLER_TYPE DEPLOY_TYPE NODE_NAME # Prepare a admin-rc file for StorPerf integration $YARDSTICK_REPO_DIR/tests/ci/prepare_storperf_admin-rc.sh +# copy a admin-rc file for StorPerf integration to the deployment location +if [ "$NODE_NAME" == "huawei-pod1" ]; then + bash $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_admin-rc.sh +fi + # Fetching id_rsa file from jump_server..." verify_connectivity() { local ip=$1 diff --git a/tests/ci/scp_storperf_admin-rc.sh b/tests/ci/scp_storperf_admin-rc.sh new file mode 100644 index 000000000..af2885b01 --- /dev/null +++ b/tests/ci/scp_storperf_admin-rc.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" +sshpass -p root scp 2>/dev/null $ssh_options ~/storperf_admin-rc \ + root@192.168.200.1:/root/ &> /dev/null diff --git a/tests/ci/yardstick-verify b/tests/ci/yardstick-verify index bdb91003d..eafadf987 100755 --- a/tests/ci/yardstick-verify +++ b/tests/ci/yardstick-verify @@ -133,8 +133,21 @@ install_storperf() exit 1 fi + fi +} + +remove_storperf() +{ + # remove Storper from huawei-pod1 + if [ "$NODE_NAME" == "huawei-pod1" ]; then echo - echo "========== Installed storperf container ==========" + echo "========== Removing storperf ==========" + + if ! yardstick -d plugin remove plugin/CI/storperf.yaml; then + echo "Remove storperf plugin FAILED"; + exit 1 + fi + fi } @@ -267,15 +280,17 @@ password = 0pnfv2015 EOF local failed=0 + local start_date + local stop_date if [ ${#SUITE_FILES[@]} -gt 0 ]; then + start_date=$(date '+%Y-%m-%d %H:%M:%S') for suite in ${SUITE_FILES[*]}; do echo "---------------------------" echo "Running test suite: $suite" echo "---------------------------" - if ! yardstick task start --suite $suite; then echo "test suite $suite FAILED"; @@ -293,8 +308,10 @@ EOF echo "Test result file ${DISPATCHER_FILE_NAME} is not exist" fi fi - done + stop_date=$(date '+%Y-%m-%d %H:%M:%S') + + local sceanrio_status="SUCCESS" @@ -303,12 +320,14 @@ EOF 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}\", - \"description\": \"yardstick ci scenario status\", - \"case_name\": \"scenario_status\", \"version\":\"${YARDSTICK_BRANCH}\", \"scenario\":\"${DEPLOY_SCENARIO}\", + \"description\": \"yardstick ci scenario status\", + \"start_date\":\"${start_date}\", + \"stop_date\":\"${stop_date}\", \"details\":\"${sceanrio_status}\"}" \ ${DISPATCHER_HTTP_TARGET} @@ -422,6 +441,7 @@ main() install_storperf run_test + remove_storperf } main |