summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildstream/testing/_utils/site.py6
-rw-r--r--tests/sources/tar.py2
-rw-r--r--tests/testutils/site.py6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/buildstream/testing/_utils/site.py b/src/buildstream/testing/_utils/site.py
index dbb4b9769..306f41c9f 100644
--- a/src/buildstream/testing/_utils/site.py
+++ b/src/buildstream/testing/_utils/site.py
@@ -49,6 +49,12 @@ except ProgramNotFoundError:
HAVE_BWRAP = False
HAVE_BWRAP_JSON_STATUS = False
+try:
+ utils.get_host_tool('lzip')
+ HAVE_LZIP = True
+except ProgramNotFoundError:
+ HAVE_LZIP = False
+
IS_LINUX = os.getenv('BST_FORCE_BACKEND', sys.platform).startswith('linux')
IS_WSL = (IS_LINUX and 'Microsoft' in platform.uname().release)
IS_WINDOWS = (os.name == 'nt')
diff --git a/tests/sources/tar.py b/tests/sources/tar.py
index 8446f485f..a6c1a4d9f 100644
--- a/tests/sources/tar.py
+++ b/tests/sources/tar.py
@@ -13,8 +13,8 @@ import pytest
from buildstream._exceptions import ErrorDomain
from buildstream import _yaml
from buildstream.testing import cli # pylint: disable=unused-import
+from buildstream.testing._utils.site import HAVE_LZIP
from tests.testutils.file_server import create_file_server
-from tests.testutils.site import HAVE_LZIP
from . import list_dir_contents
DATA_DIR = os.path.join(
diff --git a/tests/testutils/site.py b/tests/testutils/site.py
index 1ea2beb62..3fcf7e150 100644
--- a/tests/testutils/site.py
+++ b/tests/testutils/site.py
@@ -23,12 +23,6 @@ except (ImportError, ValueError):
HAVE_OSTREE = False
try:
- utils.get_host_tool('lzip')
- HAVE_LZIP = True
-except ProgramNotFoundError:
- HAVE_LZIP = False
-
-try:
import arpy # pylint: disable=unused-import
HAVE_ARPY = True
except ImportError: