]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Anticipate binapi updates with CI tests
authorWillem Toorop <willem@nlnetlabs.nl>
Fri, 6 Sep 2013 12:40:51 +0000 (14:40 +0200)
committerWillem Toorop <willem@nlnetlabs.nl>
Fri, 6 Sep 2013 12:40:51 +0000 (14:40 +0200)
And also make test_ci.sh pass on linux machines (if all is well).

packaging/ldns-config.1
packaging/ldns-config.in
test/33-test-unbound-latest.tpkg
test/test_ci.sh

index c5a00a1eb3840f6c7df339b4de51aa362186f1f4..72afc1898ebbc94b96a65858345fe2f8d2f0b646 100644 (file)
@@ -24,7 +24,11 @@ Show the flags to be used to link with ldns
 
 .TP
 \fB--version\fR
-Shows the version of the installed ldns library
+Shows the ldns version of the installed ldns library
+
+.TP
+\fB--libversion\fR
+Shows version of the binary api of the installed ldns library
 
 .TP
 \fB--help\fR
index b728ba544e120f8715e761b97f304daee74eb2ad..d2cf4d43caface45890abc958d3b38a2902935f8 100755 (executable)
@@ -9,6 +9,7 @@ LDFLAGS="@LDFLAGS@ @LIBSSL_LDFLAGS@ @PYTHON_LDFLAGS@"
 LIBS="@LIBS@ @LIBSSL_LIBS@"
 LIBDIR="@libdir@"
 INCLUDEDIR="@includedir@"
+LIBVERSION="@LIBLDNS_CURRENT@.@LIBLDNS_REVISION@.@LIBLDNS_AGE@"
 
 for arg in $@
 do
@@ -28,4 +29,8 @@ do
     then
         echo "${VERSION}"
     fi
+    if [ $arg = "--libversion" ]
+    then
+        echo "${LIBVERSION}"
+    fi
 done
index 393f6a24eb30101a58ed1c4d0b2226cedd1eabf6..ec7edd9f7c26c8e43363ff88e8c02e25a84793ec 100644 (file)
Binary files a/test/33-test-unbound-latest.tpkg and b/test/33-test-unbound-latest.tpkg differ
index b1402b5e0802178cb8a810f040accadc9f6eb947..48211f7d32a7ad4858519129d271273d0a151176 100755 (executable)
@@ -28,23 +28,45 @@ then
                 exit -1
         fi
 fi
-
+if [ "x`uname -o`" = "xGNU/Linux" ]
+then
+       ON_LINUX=1
+else
+       ON_LINUX=0
+fi
+chmod +x $BUILD_DIR/packaging/ldns-config
+BINAPI=`$BUILD_DIR/packaging/ldns-config --libversion`
+BINAPI=${BINAPI#*.}
+if [ "x$BINAPI" = "x0.0" ]
+then
+       BINAPI_CHANGED=1
+else
+       BINAPI_CHANGED=0
+fi
 # RUN THE TESTS
 for tests in $BUILD_DIR/test/*.tpkg 
 do
        TESTFN=`basename $tests`
        TESTNR=`echo $TESTFN | sed 's/-.*$//g'`
-       if [ ! -z "$ONLY_TEST" ]
+       if [ ! -z "$ONLY_TEST" -a x$ONLY_TEST != x$TESTNR ]
        then
-               if [ x$ONLY_TEST != x$TESTNR ]
+               continue
+
+       elif [ x$TESTNR != x$TESTFN ] # cause codingstyle.tpkg has no number
+       then
+               if [ $NO_REGRESSION = 1 -a $TESTNR -ge 30 ]
                then
                        continue
+
+               elif [ $ON_LINUX = 1 -a $TESTNR -eq 2  ]
+               then
+                       continue # splint doesn't work on linux
+
+               elif [ $BINAPI_CHANGED = 1 -a $TESTNR -eq 32  ]
+               then
+                       continue # Unbound regression testing not possible
                fi
        fi
-       if [ $NO_REGRESSION = 1 -a $TESTNR -ge 30 ]
-       then
-               continue
-       fi
        $TPKG -b $BUILD_DIR/test -a $BUILD_DIR exe $TESTFN
 done