]> git.saurik.com Git - apple/network_cmds.git/blame - unbound/testcode/do-tests.sh
network_cmds-596.100.2.tar.gz
[apple/network_cmds.git] / unbound / testcode / do-tests.sh
CommitLineData
89c4ed63
A
1#!/usr/bin/env bash
2. testdata/common.sh
3
4NEED_SPLINT='00-lint.tpkg'
5NEED_DOXYGEN='01-doc.tpkg'
6NEED_XXD='fwd_compress_c00c.tpkg fwd_zero.tpkg'
7NEED_NC='fwd_compress_c00c.tpkg fwd_zero.tpkg'
8NEED_CURL='06-ianaports.tpkg root_anchor.tpkg'
9NEED_WHOAMI='07-confroot.tpkg'
10NEED_IPV6='fwd_ancil.tpkg fwd_tcp_tc6.tpkg stub_udp6.tpkg edns_cache.tpkg'
11NEED_NOMINGW='tcp_sigpipe.tpkg 07-confroot.tpkg 08-host-lib.tpkg fwd_ancil.tpkg'
12
13# test if dig and ldns-testns are available.
14test_tool_avail "dig"
15test_tool_avail "ldns-testns"
16
17# test for ipv6, uses streamptcp peculiarity.
18if ./streamtcp -f ::1 2>&1 | grep "not supported" >/dev/null 2>&1; then
19 HAVE_IPV6=no
20else
21 HAVE_IPV6=yes
22fi
23
24# test mingw. no signals and so on.
25if uname | grep MINGW >/dev/null; then
26 HAVE_MINGW=yes
27else
28 HAVE_MINGW=no
29fi
30
31cd testdata;
32sh ../testcode/mini_tpkg.sh clean
33rm -f .perfstats.txt
34for test in `ls *.tpkg`; do
35 SKIP=0
36 skip_if_in_list $test "$NEED_SPLINT" "splint"
37 skip_if_in_list $test "$NEED_DOXYGEN" "doxygen"
38 skip_if_in_list $test "$NEED_CURL" "curl"
39 skip_if_in_list $test "$NEED_XXD" "xxd"
40 skip_if_in_list $test "$NEED_NC" "nc"
41 skip_if_in_list $test "$NEED_WHOAMI" "whoami"
42
43 if echo $NEED_IPV6 | grep $test >/dev/null; then
44 if test "$HAVE_IPV6" = no; then
45 SKIP=1;
46 fi
47 fi
48 if echo $NEED_NOMINGW | grep $test >/dev/null; then
49 if test "$HAVE_MINGW" = yes; then
50 SKIP=1;
51 fi
52 fi
53 if test $SKIP -eq 0; then
54 echo $test
55 sh ../testcode/mini_tpkg.sh -a ../.. exe $test
56 else
57 echo "skip $test"
58 fi
59done
60sh ../testcode/mini_tpkg.sh report
61cat .perfstats.txt