]> granicus.if.org Git - pdns/commitdiff
speedup tests
authorKees Monshouwer <mind04@monshouwer.org>
Tue, 3 Sep 2013 15:09:13 +0000 (17:09 +0200)
committermind04 <mind04@monshouwer.org>
Fri, 6 Sep 2013 23:11:13 +0000 (01:11 +0200)
.travis.yml
regression-tests/start-test-stop

index dc4e4e69b65e3773a0d8605935fc8eef6d204772..93d1bc11403554e7c4381d718735ce17428016cc 100644 (file)
@@ -18,33 +18,20 @@ script:
  - make
  - cd ../../regression-tests
  - touch verify-dnssec-zone/skip
+ - ./start-test-stop 5300 bind-both
+ - ./start-test-stop 5300 bind-dnssec-both
+ - ./start-test-stop 5300 bind-dnssec-nsec3-both
+ - ./start-test-stop 5300 bind-dnssec-nsec3-optout-both
+ - ./start-test-stop 5300 bind-dnssec-nsec3-narrow
+ - ./start-test-stop 5300 gmysql-nodnssec-both
+ - ./start-test-stop 5300 gmysql-both
+ - ./start-test-stop 5300 gmysql-nsec3-both
+ - ./start-test-stop 5300 gmysql-nsec3-optout-both
  - ./start-test-stop 5300 gmysql-nsec3-narrow
- - ./start-test-stop 5300 bind
- - ./start-test-stop 5300 bind-presigned
- - ./start-test-stop 5300 bind-dnssec
- - ./start-test-stop 5300 bind-dnssec-presigned
- - ./start-test-stop 5300 bind-dnssec-nsec3
- - ./start-test-stop 5300 bind-dnssec-nsec3-presigned
- - ./start-test-stop 5300 bind-dnssec-nsec3-optout
- - ./start-test-stop 5300 bind-dnssec-nsec3-optout-presigned
- - ./start-test-stop 5300 gmysql-nodnssec
- - ./start-test-stop 5300 gmysql-nodnssec-presigned
- - ./start-test-stop 5300 gmysql
- - ./start-test-stop 5300 gmysql-presigned
- - ./start-test-stop 5300 gmysql-nsec3
- - ./start-test-stop 5300 gmysql-nsec3-presigned
- - ./start-test-stop 5300 gmysql-nsec3-optout
- - ./start-test-stop 5300 gmysql-nsec3-optout-presigned
- - ./start-test-stop 5300 gmysql-nsec3-narrow
- - ./start-test-stop 5300 gsqlite3-nodnssec
- - ./start-test-stop 5300 gsqlite3-nodnssec-presigned
- - ./start-test-stop 5300 gsqlite3
- - ./start-test-stop 5300 gsqlite3-presigned
- - ./start-test-stop 5300 gsqlite3-nsec3
- - ./start-test-stop 5300 gsqlite3-nsec3-presigned
- - ./start-test-stop 5300 gsqlite3-nsec3-optout
- - ./start-test-stop 5300 gsqlite3-nsec3-optout-presigned
- - ./start-test-stop 5300 gsqlite3-nsec3-narrow
+ - ./start-test-stop 5300 gsqlite3-nodnssec-both
+ - ./start-test-stop 5300 gsqlite3-both
+ - ./start-test-stop 5300 gsqlite3-nsec3-both
+ - ./start-test-stop 5300 gsqlite3-nsec3-optout-both
  - ./start-test-stop 5300 mydns
  - ./start-test-stop 5300 tinydns
  - ./start-test-stop 5300 remotebackend-pipe
index 1ab42f3dc69b0410c59473c21a1f62f0815bb8d5..75e776805cc0a2659240b8ed3284635140e0b29d 100755 (executable)
@@ -175,7 +175,7 @@ bindwait ()
        loopcount=0
 
        while [ $loopcount -lt 20 ]; do
-               sleep 10
+               sleep 5
                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
                        return
@@ -300,6 +300,7 @@ rm -f pdns*.pid
 rm -f *_tests
 
 presigned=no
+both=no
 
 if [ "${context: -10}" = "-presigned" ]
 then
@@ -308,6 +309,13 @@ then
        context=${context%-presigned}
 fi
 
+if [ "${context: -5}" = "-both" ]
+then
+       both=yes
+       port=$((port-100))
+       context=${context%-both}
+fi
+
 optout=0
 
 if [ "${context: -13}" = "-nsec3-optout" ]
@@ -861,16 +869,9 @@ esac
 
 check_process
 
-export port
-export context
-export extracontexts
-export skipreasons
-export testsdir
-export optout
-
-if [ $presigned = yes ]
-then
-        skipreasons="$skipreasons presigned nodyndns"
+startslave ()
+{
+       skipreasons="$skipreasons presigned nodyndns"
        if [ ${context:0:6} = gmysql ] || [ ${context:0:7} = ext-nsd ] || [ ${context:0:8} = ext-bind ]
        then
                context=${context}-presigned
@@ -920,7 +921,7 @@ then
                loopcount=0
                while [ $loopcount -lt 20 ]
                do
-                       sleep 10
+                       sleep 5
                        todo=$(mysql --user="$GMYSQL2USER" --password="$GMYSQL2PASSWD" --host="$GMYSQl2HOST" \
                                   "$GMYSQL2DB" -ss -e 'SELECT COUNT(id) FROM domains WHERE last_check IS NULL')
                        if [ $todo = 0 ]
@@ -965,7 +966,7 @@ then
                loopcount=0
                while [ $loopcount -lt 20 ]
                do
-                       sleep 10
+                       sleep 5
                        todo=$(sqlite3 pdns.sqlite31 'SELECT COUNT(id) FROM domains WHERE last_check IS NULL')
                        if [ $todo -eq 0 ]
                        then
@@ -1013,27 +1014,59 @@ then
                echo 'waiting for zones to be loaded'
                bindwait bind-slave
        fi
-fi
+}
+
+dotests () {
+       nameserver=127.0.0.1 ./runtests $spectest
+       ./toxml
+       ./totar
+
+       if [ -s "./failed_tests" ]
+       then
+               for t in `cat failed_tests`
+               do
+                       echo -e "\n\n$t"
+                       cat $t/diff
+               done
+               eval "$1=1"
+       fi
+}
 
 ## TODO: give pdns a few seconds to startup or fail, then check if it did not fail
 ## TODO: give sdig a timeout
-nameserver=127.0.0.1 ./runtests $spectest
-./toxml
-./totar
+
+RETVAL=0
+
+export port
+export context
+export extracontexts
+export skipreasons
+export testsdir
+export optout
+
+
+if [ $presigned = no ] || [ $both = yes ]
+then
+       dotests $RETVAL
+fi
+
+if [ $presigned = yes ] || [ $both = yes ]
+then
+       startslave
+
+       export port
+       export context
+       export skipreasons
+
+       dotests $RETVAL
+fi
+
 if [ "$wait" = "wait" ]
 then
        echo tests done! push enter to terminate instance
        read l
 fi
+
 kill $(cat pdns*.pid)
 rm pdns*.pid || true
-
-if [ -s "./failed_tests" ]
-then
-       for t in `cat failed_tests`
-       do
-               echo -e "\n\n$t"
-               cat $t/diff
-       done
-       exit 1
-fi
+exit $RETVAL