]> git.sur5r.net Git - bacula/bacula/commitdiff
speed-test: Add basejob argument to test basejob speed
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 17 Sep 2009 21:00:19 +0000 (23:00 +0200)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 17 Sep 2009 21:00:19 +0000 (23:00 +0200)
regress/tests/speed-test

index b2379ef3e7aaf6918e60bfc34d3201e4e5dfa2c5..bb6b6ccd4cc8d419c2403dd86169ef540a3d6fd6 100755 (executable)
@@ -14,11 +14,17 @@ rm -rf ${tmp}/bacula-restores
 mkdir -p $cwd/files
 
 change_jobname CompressedTest $JobName
-if [ "$1" = "accurate" ]; then
+if echo $* | grep accurate >/dev/null; then
   sed 's/Name = "speed"/Name = "speed"; accurate=yes/' $conf/bacula-dir.conf > $tmp/1
   mv $tmp/1 $conf/bacula-dir.conf
 fi
 
+if echo $* | grep basejob >/dev/null; then
+  sed 's/Name = "speed"/Name = "speed"; accurate=yes;basejob=speed/' $conf/bacula-dir.conf > $tmp/1
+  mv $tmp/1 $conf/bacula-dir.conf
+  basejob="level=base"
+fi
+
 start_test
 
 # Create X million of files 
@@ -53,7 +59,7 @@ cat <<END_OF_DATA >${tmp}/bconcmds
 messages
 @$out ${tmp}/log1.out
 label storage=File volume=TestVolume001
-run job=$JobName yes
+run job=$JobName $basejob yes
 wait
 messages
 quit