mirror of https://github.com/getdnsapi/getdns.git
Compile and test succeeds on OpenBSD
This commit is contained in:
parent
48b54c3579
commit
f217ab674e
|
@ -70,6 +70,8 @@ $(distdir):
|
||||||
cp $(srcdir)/src/getdns/*.h $(distdir)/src/getdns
|
cp $(srcdir)/src/getdns/*.h $(distdir)/src/getdns
|
||||||
cp $(srcdir)/src/test/Makefile.in $(distdir)/src/test
|
cp $(srcdir)/src/test/Makefile.in $(distdir)/src/test
|
||||||
cp $(srcdir)/src/test/*.[ch] $(distdir)/src/test
|
cp $(srcdir)/src/test/*.[ch] $(distdir)/src/test
|
||||||
|
cp $(srcdir)/src/test/*.sh $(distdir)/src/test
|
||||||
|
cp $(srcdir)/src/test/*.good $(distdir)/src/test
|
||||||
cp $(srcdir)/src/test/*.can $(distdir)/src/test
|
cp $(srcdir)/src/test/*.can $(distdir)/src/test
|
||||||
cp $(srcdir)/src/example/Makefile.in $(distdir)/src/example
|
cp $(srcdir)/src/example/Makefile.in $(distdir)/src/example
|
||||||
cp $(srcdir)/src/example/*.c $(distdir)/src/example
|
cp $(srcdir)/src/example/*.c $(distdir)/src/example
|
||||||
|
|
|
@ -29,7 +29,7 @@ srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CFLAGS=@CFLAGS@ -Wall -g -fPIC -I$(srcdir)/ -I/usr/local/include -std=c99
|
CFLAGS=@CFLAGS@ -Wall -fPIC -I$(srcdir)/ -I/usr/local/include -std=c99
|
||||||
LDFLAGS=@LDFLAGS@ -levent_core -lldns -lunbound -lidn
|
LDFLAGS=@LDFLAGS@ -levent_core -lldns -lunbound -lidn
|
||||||
GETDNS_OBJ=sync.lo context.lo list.lo dict.lo convert.lo general.lo \
|
GETDNS_OBJ=sync.lo context.lo list.lo dict.lo convert.lo general.lo \
|
||||||
hostname.lo service.lo request-internal.lo validate_dnssec.lo \
|
hostname.lo service.lo request-internal.lo validate_dnssec.lo \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# run $1 > $2 and exit on failure to execute
|
# run $1 > $2 and exit on failure to execute
|
||||||
function runit () {
|
function runit {
|
||||||
echo -n "Test $1:"
|
echo -n "Test $1:"
|
||||||
./$1 > $2
|
./$1 > $2
|
||||||
if test $? -ne 0; then
|
if test $? -ne 0; then
|
||||||
|
@ -11,7 +11,7 @@ function runit () {
|
||||||
}
|
}
|
||||||
|
|
||||||
# check output files $1 and $2, exit on failure
|
# check output files $1 and $2, exit on failure
|
||||||
function diffit () {
|
function diffit {
|
||||||
if diff $1 $2; then
|
if diff $1 $2; then
|
||||||
echo " OK"
|
echo " OK"
|
||||||
else
|
else
|
||||||
|
@ -21,20 +21,20 @@ function diffit () {
|
||||||
}
|
}
|
||||||
|
|
||||||
# check output of program $1, known_good must be in $1.good
|
# check output of program $1, known_good must be in $1.good
|
||||||
function checkoutput () {
|
function checkoutput {
|
||||||
runit $1 output
|
runit $1 output
|
||||||
diffit output $1.good
|
diffit output $1.good
|
||||||
}
|
}
|
||||||
|
|
||||||
# filter out TTL and bindata stuff from $1 to $2
|
# filter out TTL and bindata stuff from $1 to $2
|
||||||
function filterout() {
|
function filterout {
|
||||||
sed -e '/"ttl"/d' -e '/"ipv4_address"/d' -e '/"ipv6_address"/d' -e '/"rdata_raw"/d' -e '/<bindata/d' <$1 >$2
|
sed -e '/"ttl"/d' -e '/"ipv4_address"/d' -e '/"ipv6_address"/d' -e '/"rdata_raw"/d' -e '/<bindata/d' <$1 >$2
|
||||||
}
|
}
|
||||||
|
|
||||||
# like checkoutput but removes addresses and TTLs and bindata
|
# like checkoutput but removes addresses and TTLs and bindata
|
||||||
# this makes the test almost useless, but it tests runtime lookup
|
# this makes the test almost useless, but it tests runtime lookup
|
||||||
# and the structure of the answer format, against the live internet.
|
# and the structure of the answer format, against the live internet.
|
||||||
function checkpacket () {
|
function checkpacket {
|
||||||
runit $1 output
|
runit $1 output
|
||||||
cp $1.good output.good
|
cp $1.good output.good
|
||||||
filterout output output2
|
filterout output output2
|
||||||
|
|
Loading…
Reference in New Issue