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-5.2.1~1611 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d4df0084fbe0554a73d22ed26dbd6d473b32fe97;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) = @_;