diff options
author | zhihui wu <wu.zhihui1@zte.com.cn> | 2017-08-23 10:34:52 +0800 |
---|---|---|
committer | zhihui wu <wu.zhihui1@zte.com.cn> | 2017-08-23 10:34:52 +0800 |
commit | 4bc87f5dc55cfbcc1cc7cdcbd1b6414d0da1e987 (patch) | |
tree | 9c56c1104d4c5cd9e2b4b4557050ecdf2f0638c2 /tests/ci/launch_containers_by_testsuite.sh | |
parent | a41a1dc52e79a2f37d0572a5ed251492f414dc57 (diff) |
Some Optimizations
- remove container and image without -f
- remove duplicated code from verify_storage.sh, replaced by
the script launch_containers_by_testsuite.sh
- move the common sentences from periodic.sh to
launch_containers_by_testsuite.sh
- add 'QTIP' as prompt for print messages
Change-Id: Ia9aa61a3b60c1049af3499a06f2c6cd0dc181552
Signed-off-by: zhihui wu <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'tests/ci/launch_containers_by_testsuite.sh')
-rwxr-xr-x | tests/ci/launch_containers_by_testsuite.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/ci/launch_containers_by_testsuite.sh b/tests/ci/launch_containers_by_testsuite.sh index ff94a02d..c291a799 100755 --- a/tests/ci/launch_containers_by_testsuite.sh +++ b/tests/ci/launch_containers_by_testsuite.sh @@ -11,6 +11,12 @@ if [[ -e $ENV_FILE ]];then rm $ENV_FILE fi +case $INSTALLER_TYPE in + apex) + INSTALLER_IP=`sudo virsh domifaddr undercloud | grep ipv4 | awk '{print $4}' | cut -d/ -f1` + ;; +esac + echo "INSTALLER_TYPE=$INSTALLER_TYPE" >> $ENV_FILE echo "INSTALLER_IP=$INSTALLER_IP" >> $ENV_FILE echo "NODE_NAME=$NODE_NAME" >> $ENV_FILE @@ -24,14 +30,14 @@ if [[ "$TEST_SUITE" == 'compute' ]];then echo "--------------------------------------------------------" if [[ ! -z $(docker ps -a | grep "opnfv/qtip:$DOCKER_TAG") ]]; then - echo "Removing existing opnfv/qtip containers..." + echo "QTIP: Removing existing opnfv/qtip containers..." container_id=$(docker ps -a | grep "opnfv/qtip:$DOCKER_TAG" | awk '{print $1}') docker stop $container_id docker rm $container_id fi if [[ $(docker images opnfv/qtip:${DOCKER_TAG} | wc -l) -gt 1 ]]; then - echo "Removing docker image opnfv/qtip:$DOCKER_TAG..." + echo "QTIP: Removing docker image opnfv/qtip:$DOCKER_TAG..." docker rmi opnfv/qtip:$DOCKER_TAG fi @@ -65,6 +71,6 @@ elif [[ "$TEST_SUITE" == 'storage' ]];then clean_containers launch_containers else - echo "Sorry, not support test suite $TEST_SUITE!" + echo "QTIP: Sorry, not support test suite $TEST_SUITE!" exit 1 fi |