diff options
author | Christoph Berg | 2013-09-18 15:37:11 +0000 |
---|---|---|
committer | Christoph Berg | 2013-09-18 15:37:11 +0000 |
commit | 42555d6f6da900f5286a5afca6012487d02c16ee (patch) | |
tree | 285474666e09aab6224a848289027eec275eae5f | |
parent | be94dd08375adc0fd1747e3f9dd556b363ee4c28 (diff) |
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
-rw-r--r-- | t/02_disk_space.t | 11 |
1 files changed, 10 insertions, 1 deletions
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'} ); |