Skip to content

Commit 5a202ce

Browse files
committed
tests: xfail integration tests that fail without buildbox-fuse
1 parent 4061a3e commit 5a202ce

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/buildstream/_testing/_utils/site.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@
7575
except (ProgramNotFoundError, OSError, subprocess.CalledProcessError):
7676
pass
7777

78+
try:
79+
utils.get_host_tool("buildbox-fuse")
80+
HAVE_BUILDBOX_FUSE = True
81+
except ProgramNotFoundError:
82+
HAVE_BUILDBOX_FUSE = False
83+
7884

7985
# Check if we have subsecond mtime support on the
8086
# filesystem where @directory is located.

tests/integration/script.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from buildstream import _yaml
88
from buildstream._testing import cli_integration as cli # pylint: disable=unused-import
9-
from buildstream._testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN
9+
from buildstream._testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN, HAVE_BUILDBOX_FUSE
1010

1111

1212
pytestmark = pytest.mark.integration
@@ -95,6 +95,7 @@ def test_script_root(cli, datafiles):
9595

9696
@pytest.mark.datafiles(DATA_DIR)
9797
@pytest.mark.skipif(not HAVE_SANDBOX, reason="Only available with a functioning sandbox")
98+
@pytest.mark.xfail(not HAVE_BUILDBOX_FUSE, reason="I don't know, seems like a bug")
9899
def test_script_no_root(cli, datafiles):
99100
project = str(datafiles)
100101
element_path = os.path.join(project, "elements")
@@ -171,6 +172,7 @@ def test_script_layout(cli, datafiles):
171172
HAVE_SANDBOX == "buildbox-run" and BUILDBOX_RUN == "buildbox-run-userchroot",
172173
reason="Root directory not writable with userchroot",
173174
)
175+
@pytest.mark.xfail(not HAVE_BUILDBOX_FUSE, reason="Root directory not writable without buildbox-fuse")
174176
def test_regression_cache_corruption(cli, datafiles):
175177
project = str(datafiles)
176178
checkout_original = os.path.join(cli.directory, "checkout-original")
@@ -215,6 +217,7 @@ def test_regression_tmpdir(cli, datafiles):
215217
HAVE_SANDBOX == "buildbox-run" and BUILDBOX_RUN == "buildbox-run-userchroot",
216218
reason="Root directory not writable with userchroot",
217219
)
220+
@pytest.mark.xfail(not HAVE_BUILDBOX_FUSE, reason="Root directory not writable without buildbox-fuse")
218221
def test_regression_cache_corruption_2(cli, datafiles):
219222
project = str(datafiles)
220223
checkout_original = os.path.join(cli.directory, "checkout-original")

0 commit comments

Comments
 (0)