From 1322a0d715f16bbdc8549ad351934506041b2eb6 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Tue, 11 Aug 2009 12:00:56 +0200 Subject: [PATCH] Use tmp instead of /tmp + fix strip-test so diff works --- regress/tests/strip-test | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/regress/tests/strip-test b/regress/tests/strip-test index e129fad8f9..d29837235b 100755 --- a/regress/tests/strip-test +++ b/regress/tests/strip-test @@ -10,10 +10,17 @@ 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 +# Make a copy of build/src/dird to be backed up +rm -rf ${tmp}/$$-strip +mkdir ${tmp}/$$-strip +cp -rpf ${cwd}/build/src/dird/ ${tmp}/$$-strip/ +echo "${tmp}/$$-strip" >${cwd}/tmp/file-list + +# Now, strip the first 4 parts of the path (which is what +# the backup will do and put the result in rpath +echo "${tmp}/$$-strip/" >${tmp}/1 +rpath=`cut -f5- -d'/' ${tmp}/1` +echo "========= $rpath" change_jobname NightlySave $JobName start_test @@ -35,6 +42,8 @@ END_OF_DATA run_bacula +rm -rf ${cwd}/tmp/bacula-restores + cat <${cwd}/tmp/bconcmds @$out /dev/null messages @@ -58,16 +67,13 @@ 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/ + diff -ur ${tmp}/$$-strip/ ${tmp}/bacula-restores/${rpath} else - diff -r /tmp/$$-strip/dird/ tmp/bacula-restores/ 2>&1 >/dev/null + diff -r ${tmp}/$$-strip/ ${tmp}/bacula-restores/${rpath} 2>&1 >/dev/null fi dstat=$? -rm -rf /tmp/$$-strip +rm -rf ${tmp}/$$-strip end_test -- 2.39.5