summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.rst9
-rw-r--r--tox.ini11
2 files changed, 20 insertions, 0 deletions
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index 6a3fbf05f..c7ab1b8ab 100644
--- a/CONTRIBUTING.rst
+++ b/CONTRIBUTING.rst
@@ -1589,6 +1589,15 @@ can run ``tox`` with ``-r`` or ``--recreate`` option.
./setup.py test --addopts 'tests/frontend/buildtrack.py::test_build_track'
+.. tip::
+
+ We also have an environment called 'venv' which takes any arguments
+ you give it and runs them inside the same virtualenv we use for our
+ tests::
+
+ tox -e venv -- <your command(s) here>
+
+ Any commands after ``--`` will be run a virtualenv managed by tox.
Observing coverage
~~~~~~~~~~~~~~~~~~
diff --git a/tox.ini b/tox.ini
index 9183e023f..dbbbf8880 100644
--- a/tox.ini
+++ b/tox.ini
@@ -91,3 +91,14 @@ commands =
deps =
click-man >= 0.3.0
-rrequirements/requirements.txt
+
+#
+# Usefull for running arbitrary scripts in a BuildStream virtual env
+#
+[testenv:venv]
+commands = {posargs}
+deps =
+ -rrequirements/requirements.txt
+ -rrequirements/dev-requirements.txt
+ -rrequirements/plugin-requirements.txt
+whitelist_externals = *