summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_fuse.py4
-rw-r--r--tests/util.py5
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_fuse.py b/tests/test_fuse.py
index 877fd64c..da0a7a42 100644
--- a/tests/test_fuse.py
+++ b/tests/test_fuse.py
@@ -2,9 +2,13 @@
#
# Tests of the fuse mount functionality.
+import pytest
import os
import util
+pytestmark = pytest.mark.skipif(
+ not util.have_fuse(), reason="bcachefs not built with fuse support.")
+
def test_mount(bfuse):
bfuse.mount()
bfuse.unmount()
diff --git a/tests/util.py b/tests/util.py
index 18d60020..b6e05e3a 100644
--- a/tests/util.py
+++ b/tests/util.py
@@ -4,6 +4,7 @@ import os
import pytest
import re
import subprocess
+import sys
import tempfile
import threading
import time
@@ -208,3 +209,7 @@ class BFuse(threading.Thread):
assert self.returncode == 0
assert len(self.stdout) > 0
assert len(self.stderr) == 0
+
+def have_fuse():
+ res = run(BCH_PATH, 'fusemount', valgrind=False)
+ return "Please supply a mountpoint." in res.stdout