]>
Commit | Line | Data |
---|---|---|
89c4ed63 A |
1 | #!/usr/bin/env bash |
2 | . testdata/common.sh | |
3 | ||
4 | NEED_SPLINT='00-lint.tpkg' | |
5 | NEED_DOXYGEN='01-doc.tpkg' | |
6 | NEED_XXD='fwd_compress_c00c.tpkg fwd_zero.tpkg' | |
7 | NEED_NC='fwd_compress_c00c.tpkg fwd_zero.tpkg' | |
8 | NEED_CURL='06-ianaports.tpkg root_anchor.tpkg' | |
9 | NEED_WHOAMI='07-confroot.tpkg' | |
10 | NEED_IPV6='fwd_ancil.tpkg fwd_tcp_tc6.tpkg stub_udp6.tpkg edns_cache.tpkg' | |
11 | NEED_NOMINGW='tcp_sigpipe.tpkg 07-confroot.tpkg 08-host-lib.tpkg fwd_ancil.tpkg' | |
12 | ||
13 | # test if dig and ldns-testns are available. | |
14 | test_tool_avail "dig" | |
15 | test_tool_avail "ldns-testns" | |
16 | ||
17 | # test for ipv6, uses streamptcp peculiarity. | |
18 | if ./streamtcp -f ::1 2>&1 | grep "not supported" >/dev/null 2>&1; then | |
19 | HAVE_IPV6=no | |
20 | else | |
21 | HAVE_IPV6=yes | |
22 | fi | |
23 | ||
24 | # test mingw. no signals and so on. | |
25 | if uname | grep MINGW >/dev/null; then | |
26 | HAVE_MINGW=yes | |
27 | else | |
28 | HAVE_MINGW=no | |
29 | fi | |
30 | ||
31 | cd testdata; | |
32 | sh ../testcode/mini_tpkg.sh clean | |
33 | rm -f .perfstats.txt | |
34 | for 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 | |
59 | done | |
60 | sh ../testcode/mini_tpkg.sh report | |
61 | cat .perfstats.txt |