source: test/Makefile @ 7e94aee

4.0.1-hotfixescachetimestampsdevelopdpdk-ndagetsilivegetfragoffhelplibtrace4ndag_formatpfringrc-4.0.1rc-4.0.2rc-4.0.3rc-4.0.4ringdecrementfixringperformanceringtimestampfixes
Last change on this file since 7e94aee was 7e94aee, checked in by Perry Lorier <perry@…>, 16 years ago

update tests to include legacyatm, and make sure we test pcapfile writing

  • Property mode set to 100644
File size: 3.4 KB
RevLine 
[06b2bcf]1
2PREFIX=../
3CC=gcc
4
[1e52a3c]5INCLUDE = -I$(PREFIX)/lib -I$(PREFIX)/libpacketdump
[fd33292]6CFLAGS = -Wall -Wimplicit -Wformat -W -pedantic -pipe -g -O2
7                -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
[06b2bcf]8CFLAGS += $(INCLUDE)
[33fead9]9libdir = $(PREFIX)/lib/.libs:$(PREFIX)/libpacketdump/.libs
[a1141240]10LDLIBS = -L$(PREFIX)/lib/.libs -L$(PREFIX)/libpacketdump/.libs -ltrace -lpacketdump -lfl
[06b2bcf]11
[faffcfc]12BINS = test-pcap-bpf test-event test-time test-dir test-wireless #test-seek
[8f80e87]13
[5b91b48]14.PHONY: all clean distclean install depend test
[06b2bcf]15
16all: $(BINS) 
[5b91b48]17
[33fead9]18test: all test-format-all test-convert-all test-write-all test-programs
19
20test-programs: $(BINS)
[8f80e87]21        @for i in $(BINS); do                                   \
[5b91b48]22                echo \* $$i;                                    \
[0ff6ddf]23                rm -f traces/*.out.*;                           \
[33fead9]24                LD_LIBRARY_PATH="$(libdir)"                     \
[5b91b48]25                 ./$$i || exit $$?;                             \
26        done                           
[8f80e87]27        @echo All tests passed
28
[f20c0a7]29test-format-all: test-format test-decode test-decode2
30# Try various link layer decodes
[c3809a2]31        @echo SLL Decoder
[f20c0a7]32        @LD_LIBRARY_PATH="$(libdir)" \
33        ./test-decode2 pcap:traces/100_sll.pcap
34
[c3809a2]35        @echo 802.1x decoder
[f20c0a7]36        @LD_LIBRARY_PATH="$(libdir)" \
37        ./test-decode2 pcap:traces/8021x.pcap
38
[c3809a2]39        @echo MPLS Decoder
[f20c0a7]40        @LD_LIBRARY_PATH="$(libdir)" \
41        ./test-decode2 pcap:traces/10_mpls_ip.pcap
[33fead9]42
[c3809a2]43        @echo Radius Decoder
[be5bd17]44        @LD_LIBRARY_PATH="$(libdir)" \
45        ./test-decode2 pcap:traces/radius.pcap
[7e94aee]46        @for i in erf pcap wtf pcapfile duck legacyatm; do      \
[c3809a2]47                echo \* Read $$i;                               \
48                rm -f traces/*.out.*;                           \
49                LD_LIBRARY_PATH="$(libdir)"                     \
50                ./test-format $$i || exit $$?;                  \
51                LD_LIBRARY_PATH="$(libdir)"                     \
52                ./test-decode $$i || exit $$?;                  \
53        done
[be5bd17]54
[33fead9]55test-write-all: test-write
[7e94aee]56        @for i in erf pcap pcapfile; do                         \
[33fead9]57                echo \* Write $$i;                              \
58                rm -f traces/*.out.*;                           \
59                LD_LIBRARY_PATH="$(libdir)"                     \
60                ./test-write $$i || exit $$?;                   \
[8f80e87]61        done
62       
63test-convert-all: test-convert
[222d8f5]64# Not all types are convertable, for instance libtrace doesn't
65# do rtclient output, and erf doesn't support 802.11
[961f687]66        @echo \* Conversions
67        @echo " * erf -> erf"
[0ff6ddf]68        @rm -f traces/*.out.*
[33fead9]69        @LD_LIBRARY_PATH="$(libdir)" ./test-convert erf erf
[961f687]70        @echo " * erf -> pcap"
[33fead9]71        @LD_LIBRARY_PATH="$(libdir)" ./test-convert erf pcap
[961f687]72        @echo " * pcap -> erf"
[0ff6ddf]73        @rm -f traces/*.out.*
[33fead9]74        @LD_LIBRARY_PATH="$(libdir)" ./test-convert pcap erf
[961f687]75        @echo " * pcapfile -> erf"
[0ff6ddf]76        @rm -f traces/*.out.*
[33fead9]77        @LD_LIBRARY_PATH="$(libdir)" ./test-convert pcapfile erf
[ac62ea2]78        @echo " * pcapfile -> pcapfile"
79        @rm -f traces/*.out.*
80        @LD_LIBRARY_PATH="$(libdir)" ./test-convert pcapfile pcapfile
81        @echo " * pcap -> pcapfile"
82        @rm -f traces/*.out.*
83        @LD_LIBRARY_PATH="$(libdir)" ./test-convert pcap pcapfile
84        @echo " * erf -> pcapfile"
85        @rm -f traces/*.out.*
86        @LD_LIBRARY_PATH="$(libdir)" ./test-convert erf pcapfile
[33fead9]87        @#LD_LIBRARY_PATH="$(libdir)" ./test-convert rtclient erf
88        @#LD_LIBRARY_PATH="$(libdir)" ./test-convert rtclient pcap
[961f687]89        @echo " * wtf -> pcap"
[0ff6ddf]90        @rm -f traces/*.out.*
[33fead9]91        @LD_LIBRARY_PATH="$(libdir)" ./test-convert wtf pcap
[7e94aee]92        @echo " * legacyatm -> pcapfile"
93        @rm -f traces/*.out.*
94        @LD_LIBRARY_PATH="$(libdir)" ./test-convert wtf pcapfile
95        @echo " * legacyatm -> pcap"
96        @rm -f traces/*.out.*
97        @LD_LIBRARY_PATH="$(libdir)" ./test-convert wtf pcap
[961f687]98        @echo " * wtf -> wtf"
[fd33292]99        #@rm -f traces/*.out.*
100        #@LD_LIBRARY_PATH="$(libdir)" ./test-convert wtf wtf
[961f687]101        @echo " * duck -> duck"
[7e94aee]102        #@rm -f traces/*.out.*
103        #@LD_LIBRARY_PATH="$(libdir)" ./test-convert duck duck
[06b2bcf]104 
105clean:
[1e52a3c]106        $(RM) $(BINS) $(OBJS) test-format  test-decode test-convert
[06b2bcf]107
108distclean:
[1e52a3c]109        $(RM) $(BINS) $(OBJS) test-format test-decode test-convert
[06b2bcf]110
111install:
112        @true
113
114# vim: noet ts=8 sw=8
Note: See TracBrowser for help on using the repository browser.