summaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ODL/CI/start_tests.sh
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2015-10-01 11:03:09 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2015-10-01 11:03:09 +0200
commit19c7d0ecfd453d5e631466401e454d4da3314f9b (patch)
treec1dac5451af1760f963d709772b5062ba2741983 /testcases/Controllers/ODL/CI/start_tests.sh
parent5901dd9a47b08c162acb631bf5acaeeb1b7ce745 (diff)
parent96bf9abe9b1b26a79dcc86900e8eb33d8544e773 (diff)
Merge branch 'master' into stable/arnoarno.2015.2.0
Diffstat (limited to 'testcases/Controllers/ODL/CI/start_tests.sh')
-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..56f4d564d 100755
--- a/testcases/Controllers/ODL/CI/start_tests.sh
+++ b/testcases/Controllers/ODL/CI/start_tests.sh
@@ -56,7 +56,11 @@ 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
if source $BASEDIR/venv/bin/activate; then
echo -e "${green}Python virtualenv activated.${nc}"
@@ -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.