]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Added failure indication to loops
authorAki Tuomi <cmouse@desteem.org>
Fri, 14 Jun 2013 11:15:16 +0000 (14:15 +0300)
committerAki Tuomi <cmouse@desteem.org>
Fri, 14 Jun 2013 11:15:16 +0000 (14:15 +0300)
regression-tests.nobackend/edns-packet-cache/command
regression-tests/start-test-stop

index 669a28fa50245cf4aaa48b62e79069a1969b11f7..532fe11d789c0cf28ab0866232c3a2ccfb990b29 100755 (executable)
@@ -13,6 +13,9 @@ bindwait ()
                        return
                fi
                let loopcount=loopcount+1
+        if [ $done != $domcount ]; then
+           echo "Domain parsing failed" >> failed_tests
+        fi
        done
 }
 
index e7f6bec34be8a694609337cc0e5e1fbe8eda96bd..944f08aad7db98fb54d778b20978823984c68fd6 100755 (executable)
@@ -21,7 +21,7 @@ bindwait ()
         fi
         loopcount=0
 
-       while [ $loopcount -lt 20 ]; do
+       while [ $loopcount < 20 ]; do
                sleep 10
                done=$( (../pdns/pdns_control --config-name=$configname --socket-dir=. --no-config bind-domain-status || true) | grep -c 'parsed into memory' || true )
                if [ $done = $domcount ]; then
@@ -29,6 +29,9 @@ bindwait ()
                fi
                 let loopcount=loopcount+1
        done
+        if [ $done != $domcount ]; then
+           echo "Domain parsing failed" >> failed_tests
+        fi
 }
 
 securezone ()
@@ -636,7 +639,7 @@ then
                        --config-name=gmysql2 |& egrep -v "update records set ordername|insert into records" &
                echo 'waiting for zones to be slaved'
                 loopcount=0
-               while [ $loopcount -lt 20 ]
+               while [ $loopcount < 20 ]
                do
                        sleep 10
                        todo=$(mysql --user="$GMYSQL2USER" --password="$GMYSQL2PASSWD" --host="$GMYSQl2HOST" \
@@ -647,6 +650,9 @@ then
                        fi
                         let loopcount=loopcount+1
                done
+               if [ $todo != 0 ]; then 
+                        echo "AXFR FAILED" >> failed_tests
+                fi
        elif [ ${context:0:8} = gsqlite3 ]
        then
                context=${context}-presigned
@@ -669,11 +675,11 @@ then
                echo 'waiting for zones to be slaved'
                set +e
                 loopcount=0
-               while [ $loopcount -lt 20 ]
+               while [ $loopcount < 20 ]
                do
                        sleep 10
                        todo=$(sqlite3 pdns.sqlite31 'SELECT COUNT(id) FROM domains WHERE last_check IS NULL')
-                       if [ $? -eq 0 ]
+                       if [ $todo -eq 0 ]
                        then
                                if [ $todo = 0 ]
                                then
@@ -682,6 +688,9 @@ then
                        fi
                         let loopcount=loopcount+1
                done
+                if [ $todo != 0 ]; then
+                        echo "AXFR FAILED" >> failed_tests
+                fi
                set -e
                sqlite3 pdns.sqlite31 ANALYZE;
        elif [ ${context:0:4} = bind ]