nexmon – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | # |
2 | # Wireshark/TShark Regression Testing |
||
3 | # |
||
4 | # This is a sample Makefile for regression testing of the |
||
5 | # Wireshark engine. These tests use that uses 'tshark -V' to analyze all |
||
6 | # the frames of a capture file. |
||
7 | # |
||
8 | # You should probably rename this file as 'Makefile' in a separate directory |
||
9 | # set aside for the sole purpose of regression testing. Two text files will |
||
10 | # be created for each capture file you test, so expect to have lots of files. |
||
11 | # |
||
12 | # Set TSHARK, CAPTURE_DIR, and CAPTURE_FILES to values appropriate for |
||
13 | # your system. Run 'make' to create the initial datasets. Type 'make accept' |
||
14 | # to accept those files as the reference set. |
||
15 | # |
||
16 | # After you make changes to TShark, run 'make regress'. This will re-run |
||
17 | # the tests and compare them against the accepted reference set of data. |
||
18 | # The comparison, which is just an invocation of 'diff -u' for the output |
||
19 | # of each trace file, will be put into a file called 'regress'. Examine |
||
20 | # this file for any changes that you did or did not expect. |
||
21 | # |
||
22 | # If you have introduced a change to TShark that shows up in the tests, but |
||
23 | # it is a valid change, run 'make accept' to accept those new data as your |
||
24 | # reference set. |
||
25 | # |
||
26 | # Commands: |
||
27 | # |
||
28 | # 'make' Creates tests |
||
29 | # 'make regress' Checks tests against accepted reference test results |
||
30 | # Report is put in file 'regress' |
||
31 | # 'make accept' Accept current tests; make them the reference test results |
||
32 | # 'make clean' Cleans any tests (but not references!) |
||
33 | |||
34 | TSHARK=/home/gram/prj/wireshark/debug/linux-ix86/tshark |
||
35 | |||
36 | CAPTURE_DIR=/home/gram/prj/sniff |
||
37 | |||
38 | CAPTURE_FILES=\ |
||
39 | dhcp-g.tr1 \ |
||
40 | genbroad.snoop \ |
||
41 | ipv6-ripng.gz \ |
||
42 | ipx.pcap \ |
||
43 | pcmjh03.tr1 \ |
||
44 | strange.iptrace \ |
||
45 | teardrop.toshiba.gz \ |
||
46 | zlip-1.pcap \ |
||
47 | zlip-2.pcap \ |
||
48 | zlip-3.pcap |
||
49 | |||
50 | ######################################## No need to modify below this line |
||
51 | |||
52 | TESTS = $(CAPTURE_FILES:=.tether) |
||
53 | REFERENCES = $(TESTS:.tether=.ref) |
||
54 | |||
55 | all: $(TESTS) |
||
56 | |||
57 | clean: |
||
58 | rm -f $(TESTS) |
||
59 | |||
60 | %.tether : $(CAPTURE_DIR)/% $(TSHARK) |
||
61 | $(TSHARK) -V -n -r $< > $@ |
||
62 | |||
63 | accept: $(REFERENCES) |
||
64 | |||
65 | %.ref : %.tether |
||
66 | mv $< $@ |
||
67 | |||
68 | regress: $(TESTS) |
||
69 | @echo "Regression Report" > regress |
||
70 | @date >> regress |
||
71 | @echo "BOF------------------------------------" >> regress |
||
72 | @for file in $(CAPTURE_FILES); do \ |
||
73 | echo Checking regression of $$file ; \ |
||
74 | diff -u $${file}.ref $${file}.tether >> regress ; \ |
||
75 | done |
||
76 | @echo "EOF------------------------------------" >> regress |