plugin_LTLIBRARIES = \
libgnunet_plugin_block_dns.la
+check_SCRIPTS = \
+ test_gnunet_dns.sh
+
gnunet_helper_dns_SOURCES = \
gnunet-helper-dns.c
$(top_builddir)/src/block/$(GN_PLUGIN_LDFLAGS)
+if ENABLE_TEST_RUN
+TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
+endif
+EXTRA_DIST = \
+ $(check_SCRIPTS)
--- /dev/null
+#!/bin/bash
+
+ME=`whoami`
+if [ "$ME" != "root" ]
+then
+ echo "This test only works if run as root. Skipping."
+ exit 0
+fi
+export PATH=".:$PATH"
+gnunet-service-dns -c dns.conf &
+gnunet-dns-redirector -c dns.conf -4 127.0.0.1 &
+sleep 1
+LO=`nslookup gnunet.org | grep Address | tail -n1`
+if [ "$LO" != "Address: 127.0.0.1" ]
+then
+ echo "Fail: $LO"
+fi
+kill `jobs -p`