[gvfs] test: Skip smb tests if smbd is not installed
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] test: Skip smb tests if smbd is not installed
- Date: Mon, 30 May 2016 10:48:21 +0000 (UTC)
commit 0e78e53866eb88897436e47412c06b67041ef6dd
Author: Ondrej Holy <oholy redhat com>
Date: Mon May 30 10:23:29 2016 +0200
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
test/gvfs-test | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index d9c4593..041bdfb 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'''
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]