2 ##############################################################################
3 # Copyright (c) 2016 ZTE and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
11 envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP}
12 -e NODE_NAME=${NODE_NAME} -e CI_DEBUG=${CI_DEBUG}"
13 dir_imgstore="${HOME}/imgstore"
15 echo "Qtip: Pulling docker image: opnfv/qtip:${DOCKER_TAG}"
16 docker pull opnfv/qtip:$DOCKER_TAG
18 cmd=" docker run -id -e $envs opnfv/qtip:${DOCKER_TAG} /bin/bash"
19 echo "Qtip: Running docker command: ${cmd}"
22 container_id=$(docker ps | grep "opnfv/qtip:${DOCKER_TAG}" | awk '{print $1}' | head -1)
23 if [ $(docker ps | grep 'opnfv/qtip' | wc -l) == 0 ]; then
24 echo "The container opnfv/qtip with ID=${container_id} has not been properly started. Exiting..."
27 echo "The container ID is: ${container_id}"
28 QTIP_REPO=/home/opnfv/repos/qtip
29 # TODO(zhihui_wu): use qtip cli to execute benchmark test in the future
30 docker exec -t ${container_id} bash -c "cd ${QTIP_REPO}/qtip/runner/ &&
31 python runner.py -d /home/opnfv/qtip/results/ -b all"