]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Add debug option to the mini_tdir.sh test code.
authorGeorge Thessalonikefs <george@nlnetlabs.nl>
Wed, 29 Jun 2022 08:47:18 +0000 (10:47 +0200)
committerGeorge Thessalonikefs <george@nlnetlabs.nl>
Wed, 29 Jun 2022 08:47:18 +0000 (10:47 +0200)
doc/Changelog
testcode/mini_tdir.sh

index 4e0716e5053a2411d7498b63f1d08c636250b67c..bad7ca4327ed81d35ee862f83bc3eced718605d3 100644 (file)
@@ -1,6 +1,9 @@
 29 June 2022: Wouter
        - iana portlist update.
 
+29 June 2022: George
+       - Add debug option to the mini_tdir.sh test code.
+
 28 June 2022: George
        - Show the output of the exact .rpl run that failed with 'make test'.
        - Fix for cached 0 TTL records to not trigger prefetching when
index 0457a95e7094fe288ffbecaa672eb7aabfd55c0b..6bbece8d9368e9d11093f38b87d722f6d62dce7c 100755 (executable)
@@ -5,6 +5,10 @@ if test "$1" = "-a"; then
        shift
        shift
 fi
+
+# This will keep the temporary directory around and return 1 when the test failed.
+DEBUG=0
+
 quiet=0
 if test "$1" = "-q"; then
        quiet=1
@@ -184,11 +188,18 @@ echo "DateRunEnd: "`date "+%s" 2>/dev/null` >> $result
 
 mv $result ..
 cd ..
-rm -rf $dir
-# compat for windows where deletion may not succeed initially (files locked
-# by processes that still have to exit).
-if test $? -eq 1; then
-       echo "minitdir waiting for processes to terminate"
-       sleep 2 # some time to exit, and try again
+if test $DEBUG -eq 0; then
        rm -rf $dir
+       # compat for windows where deletion may not succeed initially (files locked
+       # by processes that still have to exit).
+       if test $? -eq 1; then
+               echo "minitdir waiting for processes to terminate"
+               sleep 2 # some time to exit, and try again
+               rm -rf $dir
+       fi
+else
+       if test $success == "no"; then
+               exit 1
+       fi
+       exit 0
 fi