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