Make toxworkdir configurable and default to /tmp/v 28/11728/1
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Wed, 11 Jul 2018 16:01:45 +0000 (09:01 -0700)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Wed, 11 Jul 2018 16:01:45 +0000 (09:01 -0700)
By default tox environment will now be installed under /tmp/v/{envname},
but configurable through the CLI environment by specifying TOX_WORK_DIR.

This will allow users dynamically specify where the toxworkdir should
live, like so:

> TOX_WORK_DIR=$(mktemp -d -t gjjb-XXX) tox -e ...

Change-Id: I3daa4dc3538c61fb80a464a1b7e07d7b48fd7a1c
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
tox.ini

diff --git a/tox.ini b/tox.ini
index 8ed0344..e0e9c69 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -2,6 +2,8 @@
 minversion = 1.6
 envlist = coala,ensure-documented,jjb,jjb-compare-xml,license
 skipsdist = true
+passenv = TOX_WORK_DIR
+toxworkdir = {env:TOX_WORK_DIR:/tmp/v}
 
 [testenv:coala]
 basepython = python3