-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathMakefile.tests
More file actions
57 lines (41 loc) · 1.38 KB
/
Makefile.tests
File metadata and controls
57 lines (41 loc) · 1.38 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
# Makefile
SHELL := /bin/bash -l
export SHELL
VENV := ./vtmp/
export VENV
# tested on 3.10-3.14
MIN_PYTHON_VERSION := $(shell basename $$( ls /usr/bin/python3.[0-9][0-9] | awk '{print $0; exit}' ) )
export MIN_PYTHON_VERSION
# ==========================================
# Code formatting and checks
PY_FILES := *.py bin/*.py whoisdomain/
LINE_LENGTH := 160
TEST_OPTIONS_ALL = \
--withPublicSuffix \
--extractServers \
--stripHttpStatus
.PHONY: test1 test2 test3 test4 testwith
# --------------------------------------------------
# Tests
# --------------------------------------------------
test: test1 testwith test2 test3 test4
test1:
./test1.py | tee tmp/$@.1
# test2 has the data type in the output
test2:
./test2.py -f testdata/DOMAINS.txt 2>tmp/$@.2 | tee tmp/$@.1
# test3 simulates the whoisdomain command and has no data type in the output
test3:
./test3.py -f testdata/DOMAINS.txt 2>tmp/$@.2 | tee tmp/$@.1
test4:
LOGLEVEL=DEBUG ./test2.py $(TEST_OPTIONS_ALL) -t 2>tmp/$@.2 | tee tmp/$@.1
testwith: withPublicSuffix withExtractServers stripHttpStatus
withPublicSuffix:
./test2.py -d www.dublin.airport.aero --withPublicSuffix
withExtractServers:
./test2.py -d google.com --extractServers
stripHttpStatus:
./test2.py -d nic.aarp --stripHttpStatus
./test2.py -d nic.abudhabi --stripHttpStatus
./test2.py -d META.AU --stripHttpStatus
./test2.py -d google.AU --stripHttpStatus