X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=regress%2Ftests%2Flib-test-root;h=7efeb347795bfcb372e188d698c51c18856f301f;hb=cf9a9b0ca604d6f954f5b003bba822a3589b14c2;hp=22b89daffcc80532b8ba09857e2236356683ffa6;hpb=b21b88752d41626ed28ad59db16d07a5505f40c3;p=bacula%2Fbacula diff --git a/regress/tests/lib-test-root b/regress/tests/lib-test-root index 22b89daffc..7efeb34779 100755 --- a/regress/tests/lib-test-root +++ b/regress/tests/lib-test-root @@ -3,30 +3,31 @@ # Run a simple backup of the Bacula build directory # then restore it. # -echo " " -echo " " -echo " === /lib save/restore test ===" -echo " " -echo " " -if [ $UID != 0 ] ; then +MUID=`/usr/bin/id -u` +if [ $MUID != 0 ] ; then echo " " echo "You must be root to run this test." - echo " ===== Test5 failed!!! ===== " - echo " ===== Test5 failed!!! ===== " >>test.out + echo " ===== !!!! lib-test-root not run !!!! ===== " + echo " ===== !!!! lib-test-root not run !!!! ===== " >>test.out echo " " exit 1 fi cwd=`pwd` scripts/copy-test-confs +scripts/cleanup echo "/lib" >/tmp/file-list -rm -rf /tmp/TestVolume001 /tmp/bacula-restores -bin/bacula stop 2>&1 >/dev/null -bin/drop_sqlite_tables -bin/make_sqlite_tables + +echo " " +echo " " +echo " === Starting /lib save/restore test ===" +echo " " +echo " " + bin/bacula start 2>&1 >/dev/null -bin/console -c bin/console.conf <&1 >/dev/null cd / ${cwd}/bin/testls -e ${cwd}/scripts/exclude-lib-test lib >${cwd}/tmp/original -cd /tmp/bacula-restores +cd ${cwd}/tmp/bacula-restores ${cwd}/bin/testls -e ${cwd}/scripts/exclude-lib-test lib >${cwd}/tmp/restored -diff ${cwd}/tmp/original ${cwd}/tmp/restored +cd ${cwd}/tmp +sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% original >1 +sort <1 >original +# +sed s%.*lib/kbd/consolefonts$%lib/kbd/consolefonts% restored >1 +sort <1 >restored +rm -f 1 +# +cd ${cwd} +diff tmp/original tmp/restored 2>&1 1>/dev/nul if [ $? != 0 ] ; then echo " " echo " " - echo " ===== Test5 /lib failed!!! ===== " - echo " ===== Test5 failed!!! ===== " >>test.out + echo " ===== !!!! lib-test-root failed !!!! ===== " + echo " ===== !!!! lib-test-root failed !!!! ===== " >>test.out echo " " else - echo " ===== Test5 /lib OK ===== " - echo " ===== Test5 OK ===== " >>test.out + echo " ===== lib-test-root OK ===== " + echo " ===== lib-test-root OK ===== " >>test.out scripts/cleanup fi