summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2020-01-28 01:19:49 +0100
committerGitHub <noreply@github.com>2020-01-28 01:19:49 +0100
commit5c1fe78685713707af6351838effe5912990981c (patch)
treeb8cb24149f9257d61e1556f1d2c41e9ed9b4b193
parentfolder support on gcp_compute (#66511) (diff)
downloadansible-5c1fe78685713707af6351838effe5912990981c.tar.xz
ansible-5c1fe78685713707af6351838effe5912990981c.zip
Move CI coverage stub to sanity/5. (#66827)
-rwxr-xr-xtest/utils/shippable/shippable.sh22
1 files changed, 16 insertions, 6 deletions
diff --git a/test/utils/shippable/shippable.sh b/test/utils/shippable/shippable.sh
index a57ab99c87..52d62a5d1c 100755
--- a/test/utils/shippable/shippable.sh
+++ b/test/utils/shippable/shippable.sh
@@ -73,15 +73,25 @@ find lib/ansible/modules -type d -empty -print -delete
function cleanup
{
+ # for complete on-demand coverage generate a report for all files with no coverage on the "sanity/5" job so we only have one copy
+ if [ "${COVERAGE}" == "--coverage" ] && [ "${CHANGED}" == "" ] && [ "${test}" == "sanity/5" ]; then
+ stub="--stub"
+ # trigger coverage reporting for stubs even if no other coverage data exists
+ mkdir -p test/results/coverage/
+ else
+ stub=""
+ fi
+
if [ -d test/results/coverage/ ]; then
if find test/results/coverage/ -mindepth 1 -name '.*' -prune -o -print -quit | grep -q .; then
- # for complete on-demand coverage generate a report for all files with no coverage on the "other" job so we only have one copy
- if [ "${COVERAGE}" == "--coverage" ] && [ "${CHANGED}" == "" ] && [ "${test}" == "sanity/1" ]; then
- stub="--stub"
- else
- stub=""
- fi
+ process_coverage='yes' # process existing coverage files
+ elif [ "${stub}" ]; then
+ process_coverage='yes' # process coverage when stubs are enabled
+ else
+ process_coverage=''
+ fi
+ if [ "${process_coverage}" ]; then
# use python 3.7 for coverage to avoid running out of memory during coverage xml processing
# only use it for coverage to avoid the additional overhead of setting up a virtual environment for a potential no-op job
virtualenv --python /usr/bin/python3.7 ~/ansible-venv