summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2015-10-27 12:36:30 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-10-27 12:36:31 +0000
commit6c22017400294fa017a28de00e6cc756db2d450f (patch)
tree328937a00fbe4d05fa425bff39a92f1c1bc93e92
parentd108f8047a0ff3320d390727ac4fc21805a7da0d (diff)
parent261daa91519eac292a2404986c1031bf70f55d45 (diff)
Merge "Move git clone of ODL tests repo to Dockefile"
-rw-r--r--docker/Dockerfile3
-rwxr-xr-xtestcases/Controllers/ODL/CI/start_tests.sh33
-rw-r--r--testcases/Controllers/ODL/CI/test_list.txt4
3 files changed, 18 insertions, 22 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 1ac044359..59a262d20 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -52,7 +52,8 @@ 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
-ADD http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img /home/opnfv/functest/data/ \ No newline at end of file
+ADD http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img /home/opnfv/functest/data/
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