summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorPhil Dawson <phil.dawson@codethink.co.uk>2019-04-12 14:47:45 +0100
committerPhil Dawson <phil.dawson@codethink.co.uk>2019-04-12 16:06:19 +0100
commitc90cf9e8680350a75f4a76b464fdf7fe4dab4016 (patch)
treeb5f9ccc6ec40fc765e741957b614646511ff54ef /tox.ini
parent1fe1420e38d49eedd962ffb95e4a46a01c96c88b (diff)
downloadbuildstream-c90cf9e8680350a75f4a76b464fdf7fe4dab4016.tar.gz
tox.ini: Add tox env as a wrapper for running individual templated testsphil/expose-templated-tests
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini20
1 files changed, 20 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index d708694b0..82e0f13ee 100644
--- a/tox.ini
+++ b/tox.ini
@@ -127,3 +127,23 @@ deps =
-rrequirements/dev-requirements.txt
-rrequirements/plugin-requirements.txt
whitelist_externals = *
+
+
+#
+# Convenience environment for running individual tests from the
+# battery of templated source tests.
+#
+# You should pass this the part of a test node's id after "::". For
+# example, to run the test
+# buildstream/plugintestutils/_sourcetests/fetch.py::test_fetch_cross_junction[git-inline]
+# you would do tox -e sourcetests -- test_fetch_cross_junction[git-inline]
+#
+# This does rely on the fact that none of the tests in
+# buildstream.plugintestutils have the same name.
+#
+[testenv:sourcetests]
+commands = pytest --basetemp {envtmpdir} --ignore tests -k "{posargs}"
+deps =
+ -rrequirements/requirements.txt
+ -rrequirements/dev-requirements.txt
+ -rrequirements/plugin-requirements.txt