#!/bin/sh # # Attempt to strip the path # TestName="strip-test" JobName=stripTest . scripts/functions scripts/cleanup scripts/copy-strip-confs rm -rf /tmp/$$-strip mkdir /tmp/$$-strip cp -rpf ${cwd}/build/src/dird/ /tmp/$$-strip/ echo "/tmp/$$-strip" >${cwd}/tmp/file-list change_jobname NightlySave $JobName start_test cat <${cwd}/tmp/bconcmds @$out /dev/null messages @$out ${cwd}/tmp/log1.out @#setdebug level=150 dir @#setdebug level=150 storage=FileStorage setdebug level=100 client=$CLIENT label storage=FileStorage pool=Default volume=TestVolume001 run job=$JobName storage=FileStorage pool=Default yes wait messages quit END_OF_DATA run_bacula cat <${cwd}/tmp/bconcmds @$out /dev/null messages @# @# now do a restore @# @$out ${cwd}/tmp/log2.out @#setdebug level=50 client=$CLIENT restore where=${cwd}/tmp/bacula-restores select all storage=FileStorage done yes wait messages @$out quit END_OF_DATA run_bconsole check_for_zombie_jobs storage=FileStorage stop_bacula check_two_logs # # Kludge remove this next line when strip is fixed # rm -rf tmp/bacula-restores/tmp if test "$debug" -eq 1 ; then diff -ur /tmp/$$-strip/dird/ tmp/bacula-restores/ else diff -r /tmp/$$-strip/dird/ tmp/bacula-restores/ 2>&1 >/dev/null fi dstat=$? rm -rf /tmp/$$-strip end_test