From d4df0084fbe0554a73d22ed26dbd6d473b32fe97 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 11 Mar 2010 15:22:24 +0100 Subject: [PATCH] regress: Add cleanup/start/stop functions to functions.pm --- regress/scripts/functions.pm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) 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) = @_; -- 2.39.5