summaryrefslogtreecommitdiffstats
path: root/test/utils
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2019-06-08 00:48:17 +0200
committerGitHub <noreply@github.com>2019-06-08 00:48:17 +0200
commit79685a4a2d670aae0578dfe230533cdbe87ba86c (patch)
tree999cad585529ad1a7d207ae25f2f058823192064 /test/utils
parentMove azure_rm_autoscale test from group 2 to 5. (diff)
downloadansible-79685a4a2d670aae0578dfe230533cdbe87ba86c.tar.xz
ansible-79685a4a2d670aae0578dfe230533cdbe87ba86c.zip
Use Python 3.7 to run ansible-test coverage in CI. (#57555)
Generating XML for coverage reports on Python 3.7 uses far less memory than on Python 2.7. This change should avoid the MemoryError we've been seeing in the nightly coverage runs.
Diffstat (limited to 'test/utils')
-rwxr-xr-xtest/utils/shippable/shippable.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/utils/shippable/shippable.sh b/test/utils/shippable/shippable.sh
index 90e0d5f908..3571d3de4a 100755
--- a/test/utils/shippable/shippable.sh
+++ b/test/utils/shippable/shippable.sh
@@ -81,6 +81,13 @@ function cleanup
stub=""
fi
+ # 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
+ set +ux
+ . ~/ansible-venv/bin/activate
+ set -ux
+
# shellcheck disable=SC2086
ansible-test coverage xml --color -v --requirements --group-by command --group-by version ${stub:+"$stub"}
cp -a test/results/reports/coverage=*.xml shippable/codecoverage/