Tests: stop execution if can't unmount any filesystem.
This commit is contained in:
@@ -72,12 +72,19 @@ def waitforsocket(port):
|
||||
pytest.fail('Can\'t connect to the 127.0.0.1:' + str(port))
|
||||
|
||||
|
||||
def findmnt():
|
||||
def check_findmnt():
|
||||
try:
|
||||
out = subprocess.check_output(
|
||||
return subprocess.check_output(
|
||||
['findmnt', '--raw'], stderr=subprocess.STDOUT
|
||||
).decode()
|
||||
except FileNotFoundError:
|
||||
return False
|
||||
|
||||
|
||||
def findmnt():
|
||||
out = check_findmnt()
|
||||
|
||||
if not out:
|
||||
pytest.skip('requires findmnt')
|
||||
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user