[gvfs] gvfs-test: Skip Dav tests if Apache httpd is not installed



commit 005fdd7da7593541fe5a6a16a4048b00b125ee84
Author: Martin Pitt <martinpitt gnome org>
Date:   Fri Oct 12 07:43:49 2012 +0200

    gvfs-test: Skip Dav tests if Apache httpd is not installed
    
    This is more friendly for eventually running this through "make check" when not
    all test dependencies are available.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686006

 test/gvfs-test |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index 733347f..82be875 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -35,6 +35,7 @@ from glob import glob
 
 in_testbed = os.path.exists('/home/gvfs_sandbox_marker')
 samba_running = subprocess.call(['pidof', 'smbd'], stdout=subprocess.PIPE) == 0
+have_httpd = subprocess.call(['which', 'apachectl'], stdout=subprocess.PIPE) == 0
 
 local_ip = subprocess.check_output("ip -4 addr | sed -nr '/127\.0\.0/ n; "
                                    "/inet / {  s/^.*inet ([0-9.]+).*$/\\1/; p; q  }'",
@@ -789,6 +790,7 @@ pkill --signal HUP udevd || pkill --signal HUP systemd-udevd
             self.mock_polkit.wait()
             self.mock_polkit = None
 
+ unittest skipUnless(have_httpd, 'Apache httpd not installed')
 class Dav(GvfsTestCase):
     '''Test WebDAV backend'''
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]