aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/Controllers
diff options
context:
space:
mode:
authorPeter Bandzi <pbandzi@cisco.com>2015-09-25 10:52:25 +0200
committerPeter Bandzi <pbandzi@cisco.com>2015-09-25 11:09:04 +0200
commitbaf8bd95ec71a6933f88523870ae5eedecf3d016 (patch)
tree8385fa4d624c74c515b5bfeb1cee4c9d96470ee4 /testcases/Controllers
parent87247322c5137dfdd5fa3406f9f4c39a88df1e70 (diff)
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 <pbandzi@cisco.com>
Diffstat (limited to 'testcases/Controllers')
-rwxr-xr-xtestcases/Controllers/ODL/CI/start_tests.sh21
1 files changed, 16 insertions, 5 deletions
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.