summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorBrett Holman <brett.holman@canonical.com>2022-07-13 13:05:46 -0600
committerGitHub <noreply@github.com>2022-07-13 14:05:46 -0500
commit9cbd94dd57112083856ead0e0ff724e9d1c1f714 (patch)
tree765e2001636bc233b775fb949699121ffdbaec6e /tox.ini
parentb1a1a59a36a2580b2ebcb12e16c1411773548e3a (diff)
downloadcloud-init-git-9cbd94dd57112083856ead0e0ff724e9d1c1f714.tar.gz
Resource leak cleanup (#1556)
Add tox target for tracing for resource leaks, fix some leaks
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini9
1 files changed, 9 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index f35194bf..05a3e929 100644
--- a/tox.ini
+++ b/tox.ini
@@ -150,6 +150,15 @@ commands = {envpython} -m pytest \
-m hypothesis_slow \
{posargs:--hypothesis-show-statistics tests/unittests}
+#commands = {envpython} -X tracemalloc=40 -Werror::ResourceWarning:cloudinit -m pytest \
+[testenv:py3-leak]
+deps = {[testenv:py3]deps}
+commands = {envpython} -X tracemalloc=40 -Wall -m pytest \
+ --durations 10 \
+ {posargs:--cov=cloudinit --cov-branch \
+ tests/unittests}
+
+
[lowest-supported-deps]
# Tox is going to install requirements from pip. This is fine for
# testing python version compatibility, but when we build cloud-init, we are