Merge "Create Junit XML Report from tempest run" into kilo

This commit is contained in:
Jenkins
2015-07-02 14:49:08 +00:00
committed by Gerrit Code Review
3 changed files with 14 additions and 0 deletions

View File

@@ -90,6 +90,8 @@ tempest_pip_packages:
- testrepository
- testscenarios
- testtools
- python-subunit
- junitxml
tempest_image_dir: "/opt/images"
tempest_images:

View File

@@ -181,6 +181,14 @@ echo "Using test list $test_list_summary"
# execute chosen tests with pretty output
./run_tempest.sh --no-virtual-env ${RUN_TEMPEST_OPTS} -- --load-list test_list ${TESTR_OPTS};
result=$?
# Create junit xml report from test results
subunit-1to2 < .testrepository/0 | subunit2junitxml > tempest_results.xml
cp tempest_results.xml /tmp
if [ -d "/var/log/utility" ];then
# Copy the log to the utility logging directory
cp tempest_results.xml /var/log/utility/tempest_results_$(date +%Y%d%m-%H%M%S).xml
fi
popd
if [[ $result == 0 ]]; then

View File

@@ -50,4 +50,8 @@ pushd playbooks
ansible 'utility[0]' -m shell -a "export RUN_TEMPEST_OPTS=${RUN_TEMPEST_OPTS}; \
export TESTR_OPTS=${TESTR_OPTS}; \
${TEMPEST_SCRIPT_PATH} ${TEMPEST_SCRIPT_PARAMETERS}"
# Retrieve tempest test results
ansible 'utility[0]' -m fetch -a 'src=/tmp/tempest_results.xml dest=/tmp/ flat=true'
popd