From: Eric Bollengier Date: Thu, 11 Mar 2010 17:14:48 +0000 (+0100) Subject: regress: cleanup bweb tables when starting bacula X-Git-Tag: Release-5.2.1~1610 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=37a841a05a62d042b1a2fe12488aa39f23f24f26;p=bacula%2Fbacula regress: cleanup bweb tables when starting bacula --- diff --git a/regress/scripts/functions.pm b/regress/scripts/functions.pm index 337074791d..5838a090a7 100644 --- a/regress/scripts/functions.pm +++ b/regress/scripts/functions.pm @@ -100,9 +100,15 @@ sub cleanup sub start_bacula { + my $ret; $ENV{LANG}='C'; system("$bin/bacula start"); - return $? == 0; + $ret = $? == 0; + open(FP, ">$tmp/bcmd"); + print FP "sql\ntruncate client_group;\ntruncate client_group_member;\nupdate Media set LocationId=0;\ntruncate location;\n\n"; + close(FP); + system("cat $tmp/bcmd | $bin/bconsole >/dev/null"); + return $ret; } sub stop_bacula