Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
112 lines (93 loc) · 3.23 KB
/
Copy pathMakefile
File metadata and controls
112 lines (93 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/usr/bin/make -f
# This software was developed at the National Institute of Standards
# and Technology in whole or in part by employees of the Federal
# Government in the course of their official duties. Pursuant to
# title 17 Section 105 of the United States Code portions of this
# software authored by NIST employees are not subject to copyright
# protection and are in the public domain. For portions not authored
# by NIST employees, NIST has been granted unlimited rights. NIST
# assumes no responsibility whatsoever for its use by other parties,
# and makes no guarantees, expressed or implied, about its quality,
# reliability, or any other characteristic.
#
# We would appreciate acknowledgement if the software is used.
SHELL = /bin/bash
PICK_PYTHONS = ../../tests/_pick_pythons.sh
SAMPLES_DIR=../../../samples
PYTHON2 = python2.7
PYTHON3 = $(shell source $(PICK_PYTHONS) ; echo $$PYTHON3)
OBJECTS=../objects.py
all: \
check
.PHONY: \
check-diff_file_ignore-py2 \
check-diff_file_ignore-py3 \
check-py2 \
check-py3 \
check-tcpflow \
check-versioned
check: \
check-py3 \
check-tcpflow \
./cat_partitions_test.sh \
./differential_dfxml_test.sh
check-diff_file_ignore-py2: \
diff_file_ignore_sample-py2.dfxml \
diff_file_ignore_test.py
$(PYTHON2) diff_file_ignore_test.py --debug diff_file_ignore_sample-py2.dfxml
check-diff_file_ignore-py3: \
diff_file_ignore_sample-py3.dfxml \
diff_file_ignore_test.py
$(PYTHON3) diff_file_ignore_test.py --debug diff_file_ignore_sample-py3.dfxml
check-libraries-py2:
$(PYTHON2) LibraryObject_write_test.py LibraryObject_py2_test.dfxml
$(PYTHON2) LibraryObject_read_test.py LibraryObject_py2_test.dfxml
check-libraries-py3:
$(PYTHON3) LibraryObject_write_test.py LibraryObject_py3_test.dfxml
$(PYTHON3) LibraryObject_read_test.py LibraryObject_py3_test.dfxml
check-py2:
$(MAKE) \
PY=$(PYTHON2) \
check-diff_file_ignore-py2 \
check-libraries-py2 \
check-versioned
check-py3:
$(MAKE) \
PY=$(PYTHON3) \
check-diff_file_ignore-py3 \
check-libraries-py3 \
check-versioned
check-tcpflow: \
../../samples/tcpflow_zip_generic_header.xml \
../TCPFlowObjects.py \
test_TCPFlowObjects.py
$(PYTHON2) test_TCPFlowObjects.py ../../samples/tcpflow_zip_generic_header.xml
$(PYTHON3) test_TCPFlowObjects.py ../../samples/tcpflow_zip_generic_header.xml
check-versioned:
@echo Testing Python: $$PY >&2
$$PY $(OBJECTS)
$$PY DFXMLObject_program_test.py $(SAMPLES_DIR)/difference_test_0.xml vi 8.0
$$PY verify_differential_dfxml_01_test.py
$$PY verify_differential_dfxml_23_test.py
./walk_ignore_test.sh $$PY
clean:
rm -f differential_dfxml_test_??.{xml,txt}
rm -f verify_differential_dfxml_{01,23}_test.py-test[12].xml
rm -f difference_counts_test.py-d*
rm -f cat_partitions_test.sh.dfxml
rm -f diff_file_ignore_sample-py[23].dfxml
rm -f LibraryObject_py[23]_test.dfxml
rm -rf walk_ignore_test/ walk_ignore_*_test.dfxml
rm -f *~
diff_file_ignore_sample-py2.dfxml: \
$(OBJECTS) \
diff_file_ignore_sample_dfxml_test.py
rm -f _$@
$(PYTHON2) diff_file_ignore_sample_dfxml_test.py --debug _$@
mv _$@ $@
diff_file_ignore_sample-py3.dfxml: \
$(OBJECTS) \
diff_file_ignore_sample_dfxml_test.py
rm -f _$@
$(PYTHON3) diff_file_ignore_sample_dfxml_test.py --debug _$@
mv _$@ $@