X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=run_tests.sh;h=3bf18c628c35d5fbb23d8ae11a30cd7bed460a3f;hb=16bb5e7d7745aab049d1a6810cef1ee620afa9cc;hp=9901269b54d87bd41ca1eb6ad9005ab61e2efd44;hpb=75f99aaeadada56dfc974746cd83fec275133a3c;p=bottlenecks.git diff --git a/run_tests.sh b/run_tests.sh index 9901269b..3bf18c62 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -17,17 +17,16 @@ where: -h|--help show the help text -s|--teststory run specific test story one of the following: - (rubbos, vstf, posca_factor_test) + (posca_factor_test) user can also define their own test story and pass as var to this file, please refer to testsuites/posca/testsuite_story/ for details -c|--testcase run specific test case one of the following: - (posca_factor_system_bandwidth, posca_factor_ping) + (posca_factor_ping, posca_factor_soak_throughputs, ...) --cleanup cleanup test dockers runing when test is done (false by default) --report push results to DB (false by default) examples: - $(basename "$0") $(basename "$0") -s posca_factor_test" # Define global variables @@ -42,11 +41,11 @@ cleanup=false # Define alias for log printing info () { - logger -s -t "bottlenecks.info" "$*" + logger -s -t "BOTTLENECKS INFO" "$*" } error () { - logger -s -t "bottlenecks.error" "$*" + logger -s -t "BOTTLENECKS ERROR" "$*" exit 1 } @@ -104,7 +103,12 @@ function run_test(){ ;; *) info "Running posca $test_level: $test_exec" - python ${POSCA_SUITE}/../run_testsuite.py $test_level $test_exec $REPORT + opts="--privileged=true -id" + docker_volume="-v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp" + docker run $opts --name bottlenecks-load-master $docker_volume opnfv/bottlenecks:latest /bin/bash + sleep 5 + POSCA_SCRIPT="/home/opnfv/bottlenecks/testsuites/posca" + docker exec bottlenecks-load-master python ${POSCA_SCRIPT}/../run_testsuite.py ${test_level} ${test_exec} ${REPORT} ;; esac } @@ -172,7 +176,8 @@ fi # Clean up testing dockers if [[ ${cleanup} == true ]]; then info "Cleaning up docker-compose images and dockers" - docker-compose -f $BASEDIR/docker/bottleneck-compose/docker-compose.yml down --rmi all bash ${BASEDIR}/docker/docker_cleanup.sh -d influxdb --debug bash ${BASEDIR}/docker/docker_cleanup.sh -d bottlenecks --debug + bash ${BASEDIR}/docker/docker_cleanup.sh -d yardstick --debug + bash ${BASEDIR}/docker/docker_cleanup.sh -d elk --debug fi