summaryrefslogtreecommitdiff
path: root/tests/testutils/site.py
diff options
context:
space:
mode:
authorBenjamin Schubert <ben.c.schubert@gmail.com>2019-05-31 14:55:54 +0100
committerbst-marge-bot <marge-bot@buildstream.build>2019-06-06 14:33:59 +0000
commit1730ba5a2dd3f325cbe8aed29a39ef6d0b8c14ab (patch)
treea18664458b3d51d5a2b2314417dec775e82d933e /tests/testutils/site.py
parent09b0cf8a208c46440cdb4d59ef1388522f12857a (diff)
downloadbuildstream-1730ba5a2dd3f325cbe8aed29a39ef6d0b8c14ab.tar.gz
test:utils/site: Consolidate Bwrap environment variables in a single place
We have two different 'site' files that are redundant and both define some variables in BuildStream environment. Moving all the bubblewrap related ones in a single place.
Diffstat (limited to 'tests/testutils/site.py')
-rw-r--r--tests/testutils/site.py13
1 files changed, 3 insertions, 10 deletions
diff --git a/tests/testutils/site.py b/tests/testutils/site.py
index 6801ee066..1ea2beb62 100644
--- a/tests/testutils/site.py
+++ b/tests/testutils/site.py
@@ -5,8 +5,9 @@ import os
import sys
import platform
-from buildstream import _site, utils, ProgramNotFoundError
+from buildstream import utils, ProgramNotFoundError
from buildstream._platform import Platform
+from buildstream.testing._utils.site import HAVE_BWRAP as _HAVE_BWRAP
try:
@@ -22,14 +23,6 @@ except (ImportError, ValueError):
HAVE_OSTREE = False
try:
- utils.get_host_tool('bwrap')
- HAVE_BWRAP = True
- HAVE_BWRAP_JSON_STATUS = _site.get_bwrap_version() >= (0, 3, 2)
-except ProgramNotFoundError:
- HAVE_BWRAP = False
- HAVE_BWRAP_JSON_STATUS = False
-
-try:
utils.get_host_tool('lzip')
HAVE_LZIP = True
except ProgramNotFoundError:
@@ -49,7 +42,7 @@ if not IS_LINUX:
HAVE_SANDBOX = True # fallback to a chroot sandbox on unix
elif IS_WSL:
HAVE_SANDBOX = False # Sandboxes are inoperable under WSL due to lack of FUSE
-elif IS_LINUX and HAVE_BWRAP:
+elif IS_LINUX and _HAVE_BWRAP:
HAVE_SANDBOX = True
else:
HAVE_SANDBOX = False