summaryrefslogtreecommitdiff
path: root/tox.ini
diff options
context:
space:
mode:
authorBenjamin Schubert <contact@benschubert.me>2019-10-07 13:52:16 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-10-08 09:39:19 +0000
commit7f00500184d799539980ad5fc4d5ef5ddde16d35 (patch)
treee31d0addd07b9f83510692f313bf344bd009f719 /tox.ini
parentd913e5cbf8035fac76b90cde3cac71b08ec70a13 (diff)
downloadbuildstream-7f00500184d799539980ad5fc4d5ef5ddde16d35.tar.gz
setup.cfg: Fix xdg env vars to not affect the hostbschubert/fix-xdg-temppaths
A fix was made in https://gitlab.com/BuildStream/buildstream/merge_requests/1244 in order to set xdg_* env variables inside of the test's directory to avoid importing data from the host. There was however still two problems: - When a variable was not set, it was set with a relative path, which would create a configuration for BuildStream that is invalid. - When a variable was set and running with pytest directly, we would still use the variable's value, which would be the host one. This ensure this can never happen, by not relying on the same variable's name and always overriding them.
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini8
1 files changed, 4 insertions, 4 deletions
diff --git a/tox.ini b/tox.ini
index 50699177e..a00197d13 100644
--- a/tox.ini
+++ b/tox.ini
@@ -55,10 +55,10 @@ passenv =
#
setenv =
py{35,36,37}: COVERAGE_FILE = {envtmpdir}/.coverage
- py{35,36,37}: HOME = {envtmpdir}
- py{35,36,37}: XDG_CACHE_HOME = {envtmpdir}/cache
- py{35,36,37}: XDG_CONFIG_HOME = {envtmpdir}/config
- py{35,36,37}: XDG_DATA_HOME = {envtmpdir}/share
+ py{35,36,37}: BST_TEST_HOME = {envtmpdir}
+ py{35,36,37}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache
+ py{35,36,37}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config
+ py{35,36,37}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share
# This is required to get coverage for Cython
py{35,36,37}-!nocover: BST_CYTHON_TRACE = 1