summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
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