From 42555d6f6da900f5286a5afca6012487d02c16ee Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Wed, 18 Sep 2013 17:37:11 +0200 Subject: [PATCH] Skipping disk_space tests if df doesn't work df might fail in chroot environments, e.g. on build daemons where check-postgres packages are built --- t/02_disk_space.t | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/t/02_disk_space.t b/t/02_disk_space.t index 0dee62a9b..7226a627d 100644 --- a/t/02_disk_space.t +++ b/t/02_disk_space.t @@ -6,10 +6,19 @@ use 5.006; use strict; use warnings; use Data::Dumper; -use Test::More tests => 8; +use Test::More; use lib 't','.'; use CP_Testing; +# df might fail in chroot environments, e.g. on build daemons where +# check-postgres packages are built +system "df > /dev/null 2>&1"; +if ($?) { + plan skip_all => 'Skipping disk_space tests because df does not work'; +} else { + plan tests => 8; +} + use vars qw/$dbh $result $t $host $dbname/; my $cp = CP_Testing->new( {default_action => 'disk_space'} ); -- 2.39.5