- cd $WORKSPACE
-
- files=$( find . -size +1c -name ".coverage" )
- i=0
- for file in $files
- do
- sourcepath=$( dirname $file )
- #convert python coverage reports in xml ones
- cd $sourcepath
- /usr/bin/python3-coverage xml -i -o $BUILDFOLDER/python_coverage_${i}.xml
- cd $WORKSPACE
- i=$((i + 1))
- done
+ #convert python coverage reports in xml ones
+ cd $BUILDFOLDER
+ find .. -size +1c -name ".coverage*" -exec mv {} . \;
+ /usr/bin/python3-coverage combine
+ /usr/bin/python3-coverage xml -i -o ./python_coverage.xml