Skip to content

Commit edb5c84

Browse files
Merge pull request #1094 from vojtechtrefny/master_vdo-test-vdoformat-skip
tests: Skip LVM VDO tests if 'vdoformat' is not available
2 parents f5ed6a1 + 08a78e8 commit edb5c84

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

tests/lvm_dbus_tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2116,6 +2116,9 @@ def setUpClass(cls):
21162116
if lvm_version < Version("2.3.07"):
21172117
raise unittest.SkipTest("LVM version 2.3.07 or newer needed for LVM VDO.")
21182118

2119+
if not shutil.which("vdoformat"):
2120+
raise unittest.SkipTest("vdoformat executable not found in $PATH, skipping.")
2121+
21192122
super().setUpClass()
21202123

21212124
def setUp(self):

tests/lvm_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,6 +1986,9 @@ def setUpClass(cls):
19861986
if lvm_version < Version("2.3.07"):
19871987
raise unittest.SkipTest("LVM version 2.3.07 or newer needed for LVM VDO.")
19881988

1989+
if not shutil.which("vdoformat"):
1990+
raise unittest.SkipTest("vdoformat executable not found in $PATH, skipping.")
1991+
19891992
super().setUpClass()
19901993

19911994
def setUp(self):

0 commit comments

Comments
 (0)