X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Ffileregexp-test;h=caf15fa89dabf5de9ed066c010b823f043ab0676;hb=a47d15cbcf6e8d54a7c9604b4e4ea897f7ee0056;hp=ce7f7f7bd81606d7a02bf6635fbd8d4abd3d53ad;hpb=c37aae4cde57e8781f3ab68b7fa54edea4fa834d;p=bacula%2Fbacula diff --git a/regress/tests/fileregexp-test b/regress/tests/fileregexp-test old mode 100644 new mode 100755 index ce7f7f7bd8..caf15fa89d --- a/regress/tests/fileregexp-test +++ b/regress/tests/fileregexp-test @@ -1,7 +1,7 @@ #!/bin/sh # # Run a simple backup of the Bacula build directory -# then restore it. +# prune file records, then restore only README files. # TestName="fileregexp-test" JobName=backup @@ -14,19 +14,19 @@ scripts/copy-confs # Zap out any schedule in default conf file so that # it doesn't start during our test # -outf="tmp/sed_tmp" +outf="${tmp}/sed_tmp" echo "s% Schedule =%# Schedule =%g" >${outf} echo "s%File Retention =%File Retention = 2 #%" >> ${outf} -cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1 -sed -f ${outf} ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf +cp ${scripts}/bacula-dir.conf ${tmp}/1 +sed -f ${outf} ${tmp}/1 >${scripts}/bacula-dir.conf -change_jobname Client1 $JobName +change_jobname BackupClient1 $JobName start_test -cat <${cwd}/tmp/bconcmds -@output /dev/null +cat <${tmp}/bconcmds +@$out /dev/null messages -@$out ${cwd}/tmp/log1.out +@$out ${tmp}/log1.out label volume=TestVolume001 storage=File pool=Default run job=$JobName yes wait @@ -36,15 +36,14 @@ prune files yes @# @# now do a restore @# -@$out ${cwd}/tmp/log2.out -restore where=${cwd}/tmp/bacula-restores +@$out ${tmp}/log2.out +restore where=${tmp}/bacula-restores 5 no README yes wait messages -@$out quit END_OF_DATA @@ -52,17 +51,17 @@ run_bacula check_for_zombie_jobs storage=File stop_bacula -COUNT_OTHER=`find ${cwd}/tmp/bacula-restores -type f | grep -v README | wc -l` -COUNT_README=`find ${cwd}/tmp/bacula-restores -type f | grep README | wc -l` +COUNT_OTHER=`find ${tmp}/bacula-restores -type f | grep -v README | wc -l` +COUNT_README=`find ${tmp}/bacula-restores -type f | grep README | wc -l` -if [ $COUNT_OTHER -gt 0 -o $COUNT_README -lt 15 ]; then +if [ $COUNT_OTHER -gt 0 -o $COUNT_README -lt 11 ]; then print_debug "Found non matching files" - print_debug `find ${cwd}/tmp/bacula-restores -type f | grep -v README` + print_debug `find ${tmp}/bacula-restores -type f | grep -v README` rstat=2 fi #check_two_logs # don't work because of "warning file count mismatch" -grep "Backup OK" ${cwd}/tmp/log1.out > /dev/null +grep "Backup OK" ${tmp}/log1.out > /dev/null if [ $? -ne 0 ]; then print_debug "Found error on backup" bstat=2