]> git.sur5r.net Git - bacula/bacula/commitdiff
Change regression scripts to use mkdir -p to avoid spurious errors
authorKern Sibbald <kern@sibbald.com>
Thu, 17 Sep 2009 12:14:47 +0000 (14:14 +0200)
committerKern Sibbald <kern@sibbald.com>
Thu, 17 Sep 2009 12:14:47 +0000 (14:14 +0200)
14 files changed:
regress/tests/2drive-incremental-2disk
regress/tests/2drive-incremental-changer
regress/tests/accurate-test
regress/tests/acl-xattr-test
regress/tests/big-files-test
regress/tests/disk-changer-test
regress/tests/incremental-2disk
regress/tests/incremental-changer
regress/tests/incremental-tape
regress/tests/multi-storage-test
regress/tests/restore-by-file-test
regress/tests/restore-disk-seek-test
regress/tests/restore-seek-tape
regress/tests/strip-test

index 2a6ff418f5fb0037d388dfbfa1173da1c9305514..504bd06e41fb5945bbb8aea4611264b5d16bc974 100755 (executable)
@@ -19,7 +19,7 @@ start_test
 
 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
 if test ! -d ${cwd}/tmp/build ; then
-   mkdir ${cwd}/tmp/build
+   mkdir -p ${cwd}/tmp/build
 fi
 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
 cd ${cwd}/tmp
index 9e38d0faf8969615b6cddf533f2241660bb307f2..681aecea13b22717ef5e0570d7d778ea94d3c6e6 100755 (executable)
@@ -20,7 +20,7 @@ change_jobname localhost-fd $JobName
 
 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
 if test ! -d ${cwd}/tmp/build ; then
-   mkdir ${cwd}/tmp/build
+   mkdir -p ${cwd}/tmp/build
 fi
 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
 cd ${cwd}/tmp
index 001d1106d585de3cb6fba8cdb978b686421b8623..f4fbdbde4601c0d5219c277338dd8edfa383218f 100755 (executable)
@@ -33,8 +33,8 @@ rm -rf ${cwd}/build/accurate
 
 
 # add extra files
-mkdir ${cwd}/build/accurate
-mkdir ${cwd}/build/accurate/dirtest
+mkdir -p ${cwd}/build/accurate
+mkdir -p ${cwd}/build/accurate/dirtest
 echo "test test" > ${cwd}/build/accurate/dirtest/hello
 echo "test test" > ${cwd}/build/accurate/xxx
 echo "test test" > ${cwd}/build/accurate/yyy
index 162238f382c13479a31634eb5dfaa6ff5dd7e76c..70c73d5f126292f35abc5532586e84fb771f818d 100755 (executable)
@@ -60,8 +60,8 @@ d=${cwd}/build/acl
 
 uid=`id -u`
 rm -rf $d
-mkdir $d
-mkdir $d/testdir
+mkdir -p $d
+mkdir -p $d/testdir
 cp ${cwd}/bin/bconsole $d
 
 case `uname -s` in
index 04c543bb403d341c07c305d8b89de2ba293aafa3..6daa915bcdcaced16cbd1162d2bdeb402e081d61 100755 (executable)
@@ -16,7 +16,7 @@ copy_test_confs
 
 echo "${cwd}/many-files" >${cwd}/tmp/file-list
 if [ ! -f ${cwd}/many-files/100000file100000 ]; then
-    mkdir ${cwd}/many-files
+    mkdir -p ${cwd}/many-files
     cd ${cwd}/many-files
     print_debug "Creating files..."
     time perl -e 'for($i=0; $i < 2000000; $i++) {open(FP, ">${i}file${i}") or die "$!"; print FP "$i\n"; close(FP); print "." if ($i%10000);}'
index b497098e23bf9c515dd3d04ed48e7fb39206652c..b45c687fdd5329ac49809c30719f6e438b28316a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 rm -rf tmp/disk-changer
-mkdir tmp/disk-changer
+mkdir -p tmp/disk-changer
 touch tmp/disk-changer/conf 
 echo "Unload drive 0"
 $scripts/disk-changer tmp/disk-changer/conf unload 1 tmp/disk-changer/drive0 0
index 500d854afc311ba60959334895e35c902313b965..b4bf8292d0f2be848ca5be1d28c3a0b617a436cf 100755 (executable)
@@ -15,7 +15,7 @@ scripts/prepare-disk-changer
 
 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
 if test ! -d ${cwd}/tmp/build ; then
-   mkdir ${cwd}/tmp/build
+   mkdir -p ${cwd}/tmp/build
 fi
 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
 cd ${cwd}/tmp
index daa324c3a96c0879ffd7c97aacac70e9b9be9846..6eb5a5b9594f3952571d84e637af0a3322716f7d 100755 (executable)
@@ -18,7 +18,7 @@ scripts/prepare-two-tapes
 
 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
 if test ! -d ${cwd}/tmp/build ; then
-   mkdir ${cwd}/tmp/build
+   mkdir -p ${cwd}/tmp/build
 fi
 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
 cd ${cwd}/tmp
index 26d62deb432ca9a889e8f54cccac463dbfa4df3b..198834f6e5758186a60e59898aca82cae4d6e15a 100755 (executable)
@@ -14,7 +14,7 @@ scripts/cleanup-tape
 
 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
 if test ! -d ${cwd}/tmp/build ; then
-   mkdir ${cwd}/tmp/build
+   mkdir -p ${cwd}/tmp/build
 fi
 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
 cd ${cwd}/tmp
index 5c13487ce4928357b8ef09203b51b9c767c4570a..da2f17b1d39f160831d4bb046675b1d951bf044a 100755 (executable)
@@ -18,7 +18,7 @@ if (/WorkingDirectory/) { $_ =~ s/"$/2"/; }
 print;
 ' $conf/bacula-sd.conf > $conf/bacula-sd2.conf
 
-mkdir ${working}2
+mkdir -p ${working}2
 
 perl -ne '
 if (/^Storage {/) { $in=1; $nb++; }
index a01c409a25bd305378bc480a8e899d44ac4f03f8..18bc7f72c7e5a9c49bb67432b7e3607e3b9c0078 100755 (executable)
@@ -11,7 +11,7 @@ JobName=restorebyfile
 scripts/cleanup
 scripts/copy-test-confs
 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
-mkdir ${cwd}/tmp/build
+mkdir -p ${cwd}/tmp/build
 cp -p ${cwd}/build/src/dird/*.c ${cwd}/tmp/build
 cd ${cwd}/tmp/build
 ls >../1
index 3f6db5d143338c8a546ed25d3a9a0a9f16dd6f59..495bb45ca224727f7a7eff661ff2428e3f9f1fcc 100755 (executable)
@@ -14,7 +14,7 @@ scripts/cleanup
 scripts/copy-test-confs
 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
 rm -rf ${cwd}/tmp/build
-mkdir ${cwd}/tmp/build
+mkdir -p ${cwd}/tmp/build
 # Copy only the .c files (to be restored)
 #  set files to "*.c" for all c files
 files="ua_tree.c ua_update.c"
@@ -36,7 +36,7 @@ cd ${cwd}
 # Now arrange to backup *everything* 
 #
 rm -rf  ${cwd}/tmp/build
-mkdir ${cwd}/tmp/build
+mkdir -p ${cwd}/tmp/build
 cp -fp ${cwd}/build/src/dird/* ${cwd}/tmp/build
 #
 # Enable MaximumFileSize to ensure lots of JobMedia records and thus
@@ -82,7 +82,7 @@ stop_bacula
 
 # Now setup a control directory of only what we *should* restore
 rm -rf ${cwd}/tmp/build
-mkdir  ${cwd}/tmp/build
+mkdir -p  ${cwd}/tmp/build
 for i in ${files}; do
    cp -p ${cwd}/build/src/dird/${i} ${cwd}/tmp/build
 done
index f543caab4bba09e6277d4028ab6ffba41584e058..53bf6de6d236d2dfc75067b27f000963957971fc 100755 (executable)
@@ -17,7 +17,7 @@ scripts/cleanup-tape
 
 echo "${cwd}/tmp/build" >${cwd}/tmp/file-list
 rm -rf ${cwd}/tmp/build
-mkdir ${cwd}/tmp/build
+mkdir -p ${cwd}/tmp/build
 # Copy only the .c files (to be restored)
 #  set files to "*.c" for all c files
 files="ua_tree.c ua_update.c"
@@ -39,7 +39,7 @@ cd ${cwd}
 # Now arrange to backup *everything*
 #
 rm -rf  ${cwd}/tmp/build
-mkdir ${cwd}/tmp/build
+mkdir -p ${cwd}/tmp/build
 cp -fp ${cwd}/build/src/dird/* ${cwd}/tmp/build
 #
 # Enable MaximumFileSize to ensure lots of JobMedia records and thus
@@ -85,7 +85,7 @@ stop_bacula
 
 # Now setup a control directory of only what we *should* restore
 rm -rf ${cwd}/tmp/build
-mkdir  ${cwd}/tmp/build
+mkdir -p  ${cwd}/tmp/build
 for i in ${files}; do
    cp -p ${cwd}/build/src/dird/${i} ${cwd}/tmp/build
 done
index 253cfbdc3fda174382cd3992f1a467715c64d6b5..31a2e3388403bf0292dba0f9647baff1a395f815 100755 (executable)
@@ -12,7 +12,7 @@ scripts/copy-strip-confs
 
 # Make a copy of build/src/dird to be backed up
 rm -rf ${tmp}/$$-strip
-mkdir ${tmp}/$$-strip
+mkdir -p ${tmp}/$$-strip
 cp -rpf ${cwd}/build/src/dird/ ${tmp}/$$-strip/
 echo "${tmp}/$$-strip" >${cwd}/tmp/file-list