summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2016-05-30 10:23:29 +0200
committerOndrej Holy <oholy@redhat.com>2016-05-30 12:37:02 +0200
commit0e78e53866eb88897436e47412c06b67041ef6dd (patch)
treea0ebee78e1eb40330739e35b2609e181a56bbad2 /test
parent426f1d526579ce32d57f95eb3e7578cabcbd1fda (diff)
downloadgvfs-0e78e53866eb88897436e47412c06b67041ef6dd.tar.gz
test: Skip smb tests if smbd is not installed
Currently smb tests fail if smbd is not installed with the following error: FileNotFoundError: [Errno 2] No such file or directory: 'smbd' Smb tests should be skipped if smbd is not installed to avoid test suite failures. https://bugzilla.gnome.org/show_bug.cgi?id=734370
Diffstat (limited to 'test')
-rwxr-xr-xtest/gvfs-test2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/gvfs-test b/test/gvfs-test
index d9c45939..041bdfb3 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -51,6 +51,7 @@ except ImportError:
umockdev_testbed = None
have_twistd = subprocess.call(['which', 'twistd'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0
+have_smbd = subprocess.call(['which', 'smbd'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0
def find_alternative(cmds):
'''Find command in cmds array and return the found alternative'''
@@ -747,6 +748,7 @@ class Ftp(GvfsTestCase):
self.assertEqual(contents, b'hello world\n')
+@unittest.skipUnless(have_smbd, 'Samba smbd not installed')
class Smb(GvfsTestCase):
def setUp(self):
'''start local smbd as user if we are not in test bed'''