From 261daa91519eac292a2404986c1031bf70f55d45 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Fri, 23 Oct 2015 12:44:52 +0200 Subject: Move git clone of ODL tests repo to Dockefile JIRA: FUNCTEST-80 Change-Id: I39a0928f7a8c74d1cbb6db47b30e2cf2f9ae4ca1 Signed-off-by: jose.lausuch --- docker/Dockerfile | 1 + testcases/Controllers/ODL/CI/start_tests.sh | 33 ++++++++++++----------------- testcases/Controllers/ODL/CI/test_list.txt | 4 ++-- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 95ef22b5d..53cfe15f0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -52,5 +52,6 @@ RUN git config --global http.sslVerify false RUN git clone https://gerrit.opnfv.org/gerrit/functest ${repos_dir}/functest RUN git clone https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng RUN git clone https://github.com/openstack/rally.git ${repos_dir}/rally +RUN git clone https://github.com/opendaylight/integration.git ${repos_dir}/odl_integration RUN pip install -r ${repos_dir}/functest/docker/requirements.pip diff --git a/testcases/Controllers/ODL/CI/start_tests.sh b/testcases/Controllers/ODL/CI/start_tests.sh index 0b1c4a7f7..ddb15cad3 100755 --- a/testcases/Controllers/ODL/CI/start_tests.sh +++ b/testcases/Controllers/ODL/CI/start_tests.sh @@ -2,6 +2,10 @@ # it includes python2.7 virtual env with robot packages and git BASEDIR=`dirname $0` +RESULTS_DIR='/home/opnfv/functest/results/odl/' +REPO_DIR='/home/opnfv/repos/old_integration' +#TODO: read this form config_functest.yaml + # Colors green='\033[0;32m' light_green='\033[1;32m' @@ -43,27 +47,18 @@ PASS=${PASS:-'octopus'} NEUTRON_IP=${NEUTRON_IP:-192.168.0.68} set +x -echo -e "${green}Cloning ODL integration git repo.${nc}" -if [ -d ${BASEDIR}/integration ]; then - cd ${BASEDIR}/integration - git checkout -- . - git pull - cd - -else - git clone https://github.com/opendaylight/integration.git ${BASEDIR}/integration -fi # Change openstack password for admin tenant in neutron suite -sed -i "s/\"password\": \".*\"/\"password\": \"${PASS}\"/" ${BASEDIR}/integration/test/csit/suites/openstack/neutron/__init__.robot +sed -i "s/\"password\": \".*\"/\"password\": \"${PASS}\"/" ${REPO_DIR}/integration/test/csit/suites/openstack/neutron/__init__.robot # Add Start Suite and Teardown Suite -sed -i "/^Documentation.*/a Suite Teardown Stop Suite" ${BASEDIR}/integration/test/csit/suites/openstack/neutron/__init__.robot -sed -i "/^Documentation.*/a Suite Setup Start Suite" ${BASEDIR}/integration/test/csit/suites/openstack/neutron/__init__.robot +sed -i "/^Documentation.*/a Suite Teardown Stop Suite" ${REPO_DIR}/integration/test/csit/suites/openstack/neutron/__init__.robot +sed -i "/^Documentation.*/a Suite Setup Start Suite" ${REPO_DIR}/integration/test/csit/suites/openstack/neutron/__init__.robot # add custom tests to suite, if there are more custom tests needed this will be reworked echo -e "${green}Copy custom tests to suite.${nc}" -cp -vf $BASEDIR/custom_tests/neutron/* $BASEDIR/integration/test/csit/suites/openstack/neutron/ +cp -vf ${BASEDIR}/custom_tests/neutron/* ${REPO_DIR}/integration/test/csit/suites/openstack/neutron/ # List of tests are specified in test_list.txt # those are relative paths to test directories from integartion suite @@ -78,16 +73,16 @@ do ((test_num++)) echo -e "${light_green}Starting test: $line ${nc}" - pybot -v OPENSTACK:${NEUTRON_IP} -v PORT:${ODL_PORT} -v CONTROLLER:${ODL_IP} ${BASEDIR}/$line - mkdir -p $BASEDIR/logs/${test_num} - mv log.html $BASEDIR/logs/${test_num}/ - mv report.html $BASEDIR/logs/${test_num}/ - mv output.xml $BASEDIR/logs/${test_num}/ + pybot -v OPENSTACK:${NEUTRON_IP} -v PORT:${ODL_PORT} -v CONTROLLER:${ODL_IP} ${REPO_DIR}/$line + mkdir -p $RESULTS_DIR/logs/${test_num} + mv log.html $RESULTS_DIR/logs/${test_num}/ + mv report.html $RESULTS_DIR/logs/${test_num}/ + mv output.xml $RESULTS_DIR/logs/${test_num}/ done < ${BASEDIR}/test_list.txt # create final report which includes all partial test reports for i in $(seq $test_num); do - rebot_params="$rebot_params $BASEDIR/logs/$i/output.xml" + rebot_params="$rebot_params $RESULTS_DIR/logs/$i/output.xml" done echo -e "${green}Final report is located:${nc}" diff --git a/testcases/Controllers/ODL/CI/test_list.txt b/testcases/Controllers/ODL/CI/test_list.txt index e5e52129b..63f4cda52 100644 --- a/testcases/Controllers/ODL/CI/test_list.txt +++ b/testcases/Controllers/ODL/CI/test_list.txt @@ -1,5 +1,5 @@ # List of tests` which will be executed by script start_test.sh # You can specify path to specific robot test file or directory (in that case all tests from directory will be executed) -integration/test/csit/suites/integration/basic/ -integration/test/csit/suites/openstack/neutron/ +test/csit/suites/integration/basic/ +test/csit/suites/openstack/neutron/ \ No newline at end of file -- cgit 1.2.3-korg