From: Eric Bollengier Date: Thu, 11 Mar 2010 14:22:24 +0000 (+0100) Subject: regress: Add cleanup/start/stop functions to functions.pm X-Git-Tag: Release-7.0.0~2076 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6a66f0899d1c0e9c63117db4908ff8add15683de;p=bacula%2Fbacula regress: Add cleanup/start/stop functions to functions.pm --- diff --git a/regress/scripts/functions.pm b/regress/scripts/functions.pm index 37d11eab69..337074791d 100644 --- a/regress/scripts/functions.pm +++ b/regress/scripts/functions.pm @@ -39,7 +39,7 @@ use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(update_some_files create_many_files check_multiple_copies update_client $HOST $BASEPORT add_to_backup_list check_volume_size - create_many_dirs + create_many_dirs cleanup start_bacula stop_bacula check_min_volume_size check_max_volume_size $estat $bstat $rstat $zstat $cwd $bin $scripts $conf $rscripts $tmp $working extract_resource $db_name $db_user $db_password $src $tmpsrc); @@ -92,6 +92,26 @@ BEGIN { $estat = $rstat = $bstat = $zstat = 0; } +sub cleanup +{ + system("$rscripts/cleanup"); + return $? == 0; +} + +sub start_bacula +{ + $ENV{LANG}='C'; + system("$bin/bacula start"); + return $? == 0; +} + +sub stop_bacula +{ + $ENV{LANG}='C'; + system("$bin/bacula stop"); + return $? == 0; +} + sub extract_resource { my ($file, $type, $name) = @_;