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-7.0.0~2075 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=420bc7d9c49b51f592e443ebfdb02e1943e2581c;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