From baf8bd95ec71a6933f88523870ae5eedecf3d016 Mon Sep 17 00:00:00 2001 From: Peter Bandzi Date: Fri, 25 Sep 2015 10:52:25 +0200 Subject: Fix for ODL suite There is required to add into __init__.py of neutron suite following two lines: Suite Setup Start Suite Suite Teardown Stop Suite Otherwise there were errors like unknown variables. Also adding some small enhancements like creating one final report from partial reports JIRA: FUNCTEST-41 Change-Id: Ia91e05ebf378104af5d98029b154d7394559678e Signed-off-by: Peter Bandzi --- testcases/Controllers/ODL/CI/start_tests.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'testcases') diff --git a/testcases/Controllers/ODL/CI/start_tests.sh b/testcases/Controllers/ODL/CI/start_tests.sh index 7bc0b513b..a6645fc3c 100755 --- a/testcases/Controllers/ODL/CI/start_tests.sh +++ b/testcases/Controllers/ODL/CI/start_tests.sh @@ -56,8 +56,12 @@ else fi # Change openstack password for admin tenant in neutron suite -sed -i "s/\"password\": \"admin\"/\"password\": \"${PASS}\"/" ${BASEDIR}/integration/test/csit/suites/openstack/neutron/__init__.robot +sed -i "s/\"password\": \".*\"/\"password\": \"${PASS}\"/" ${BASEDIR}/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 +exit 0 if source $BASEDIR/venv/bin/activate; then echo -e "${green}Python virtualenv activated.${nc}" else @@ -72,7 +76,7 @@ cp -vf $BASEDIR/custom_tests/neutron/* $BASEDIR/integration/test/csit/suites/ope # List of tests are specified in test_list.txt # those are relative paths to test directories from integartion suite echo -e "${green}Executing chosen tests.${nc}" -test_num=1 +test_num=0 while read line do # skip comments @@ -80,16 +84,23 @@ do # skip empty lines [[ -z "${line}" ]] && continue + ((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}/ - ((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" +done + +echo -e "${green}Final report is located:${nc}" +rebot $rebot_params + +# deactivate venv echo -e "${green}Deactivate venv.${nc}" deactivate - -# Now we can copy output.xml, log.html and report.xml files generated by robot. -- cgit 1.2.3-korg