summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Dawson <phildawson.0807@gmail.com>2019-02-20 16:11:52 +0000
committerPhil Dawson <phildawson.0807@gmail.com>2019-02-20 16:11:52 +0000
commitfefc68fb7813a1be5a7bef6c45cdb248e7b2bafb (patch)
treefcaea2048f757e7cfbd6514a3dd18ac3ed58be38
parent80a0832cf23950dd91a5cd233091af902e8754e8 (diff)
parenteee9e2834079439ce451c64e4ae2dfbfe6d1fccb (diff)
downloadbuildstream-fefc68fb7813a1be5a7bef6c45cdb248e7b2bafb.tar.gz
Merge branch 'phil/tox-vev-environment' into 'master'
tox.ini: Add 'venv' environment to run arbitrary commands in a venv See merge request BuildStream/buildstream!1168
-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 = *