source: test/do-tests.sh @ 6eeda5b

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 6eeda5b was 6eeda5b, checked in by Shane Alcock <salcock@…>, 10 years ago
  • Fixed issues in test Makefile that seem to be problematic on FreeBSD
  • Actually ensure plen test run
  • Set $Id$ property of test-plen.c
  • Property mode set to 100755
File size: 3.5 KB
Line 
1#!/bin/bash
2
3OK=0
4FAIL=""
5
6do_test() {
7        if $@; then
8                OK=$[ $OK + 1 ]
9        else
10                FAIL="$FAIL
11$@"
12        fi
13}
14
15libdir=../lib/.libs:../libpacketdump/.libs
16export LD_LIBRARY_PATH="$libdir"
17export DYLD_LIBRARY_PATH="${libdir}"
18echo SLL Decoder
19do_test ./test-decode2 pcap:traces/100_sll.pcap
20
21echo 802.1x decoder
22do_test ./test-decode2 pcap:traces/8021x.pcap
23
24echo MPLS Decoder
25do_test ./test-decode2 pcap:traces/10_mpls_ip.pcap
26
27echo Radius Decoder
28do_test ./test-decode2 pcap:traces/radius.pcap
29
30rm -f traces/*.out.*
31echo \* Read erf
32do_test ./test-format erf
33do_test ./test-decode erf
34
35echo \* Read pcap
36do_test ./test-format pcap
37do_test ./test-decode pcap
38
39echo \* Read pcapfile
40do_test ./test-format pcapfile
41do_test ./test-decode pcapfile
42
43echo \* Read legacyatm
44do_test ./test-format legacyatm
45do_test ./test-decode legacyatm
46
47echo \* Read legacyeth
48do_test ./test-format legacyeth
49do_test ./test-decode legacyeth
50
51echo \* Read legacypos
52do_test ./test-format legacypos
53do_test ./test-decode legacypos
54
55echo \* Read tsh
56do_test ./test-format tsh
57do_test ./test-decode tsh
58
59echo \* Testing pcap-bpf
60do_test ./test-pcap-bpf
61
62echo \* Testing payload length
63do_test ./test-plen
64
65echo \* Testing event framework
66do_test ./test-event
67
68echo \* Testing time conversions
69do_test ./test-time
70
71echo \* Testing directions
72do_test ./test-dir
73
74echo \* Testing wireless
75do_test ./test-wireless
76
77echo \* Testing error handling
78do_test ./test-errors
79
80echo \* Testing drop counters for erf
81do_test ./test-drops erf
82
83echo \* Testing drop counters for pcapfile
84do_test ./test-drops pcapfile
85
86echo \* Testing drop counters for duck
87do_test ./test-drops duck
88
89echo \* Testing drop counters for legacyatm
90do_test ./test-drops legacyatm
91
92echo \* Testing drop counters for legacypos
93do_test ./test-drops legacypos
94
95echo \* Testing drop counters for legacyeth
96do_test ./test-drops legacyeth
97
98echo \* Testing drop counters for tsh
99do_test ./test-drops tsh
100
101echo \* Testing writing erf
102do_test ./test-write erf
103
104echo \* Testing write pcap
105do_test ./test-write pcap
106
107echo \* Testing write pcapfile
108do_test ./test-write pcapfile
109
110# Not all types are convertable, for instance libtrace doesn't
111# do rtclient output, and erf doesn't support 802.11
112echo \* Conversions
113echo " * erf -> erf"
114rm -f traces/*.out.*
115do_test ./test-convert erf erf
116
117echo " * erf -> pcap"
118do_test ./test-convert erf pcap
119
120echo " * pcap -> erf"
121rm -f traces/*.out.*
122do_test ./test-convert pcap erf
123
124echo " * pcapfile -> erf"
125rm -f traces/*.out.*
126do_test ./test-convert pcapfile erf
127
128echo " * pcapfile -> pcapfile"
129rm -f traces/*.out.*
130do_test ./test-convert pcapfile pcapfile
131
132echo " * pcap -> pcapfile"
133rm -f traces/*.out.*
134do_test ./test-convert pcap pcapfile
135
136echo " * erf -> pcapfile"
137rm -f traces/*.out.*
138do_test ./test-convert erf pcapfile
139#./test-convert rtclient erf
140#./test-convert rtclient pcap
141
142# This doesn't work because pcap doesn't support legacyatm's linktype
143# so the packet is converted to a raw IP packet, which when read
144# back in again doesn't match legacyatm's original packet.
145#echo " * legacyatm -> pcapfile"
146#rm -f traces/*.out.*
147#./test-convert legacyatm pcapfile
148
149echo " * legacyeth -> pcapfile"
150rm -f traces/*.out.*
151do_test ./test-convert legacyeth pcapfile
152
153echo " * legacypos -> pcapfile"
154rm -f traces/*.out.*
155do_test ./test-convert legacypos pcapfile
156
157echo " * duck -> duck"
158rm -f traces/*.out.*
159do_test ./test-convert duck duck
160
161echo " * tsh -> pcapfile"
162rm -f traces/*.out.*
163do_test ./test-convert tsh pcapfile
164
165echo " * tsh -> pcap"
166rm -f traces/*.out.*
167do_test ./test-convert tsh pcap
168
169echo
170echo "Tests passed: $OK"
171echo "Tests failed: $FAIL"
Note: See TracBrowser for help on using the repository browser.