Debian Codegraph @

t/Makefile.examples

raw
1 #! /usr/bin/make -rRf
2 #?
3 #? DESCRIPTION
4 #? For more details please see
5 #? ../Makefile Makefile Makefile.help Makefile.pod
6 #? make help.test.examples
7 #?
8 #? VERSION
9 #? @(#) 1.9 22/09/21 09:58:23
10 #?
11 #? AUTHOR
12 #? 19-apr-19 Achim Hoffmann
13 #?
14 # -----------------------------------------------------------------------------
15
16 HELP-help.test.examples = print targets for testing documented examples
17
18 _SID.examples := 1.9
19
20 _MYSELF.examples := t/Makefile.examples
21 ALL.includes += $(_MYSELF.examples)
22 ALL.inc.type += examples
23 ALL.help.tests += help.test.examples
24
25 first-examples-target-is-default: help.test.examples
26
27 ifeq (,$(_SID.test))
28 -include t/Makefile
29 endif
30
31 help.test.examples: HELP_TYPE = examples
32 help.test.examples-v: HELP_TYPE = examples
33 help.test.examples-vv: HELP_TYPE = examples
34
35 #_____________________________________________________________________________
36 #________________________________________________________________ variables __|
37
38 TEST.examples.hosts = localhost
39
40 HELP-_examples1 = ______________________________ testing documented examples _
41 HELP-test.examples = test various documented examples
42 HELP-test.examples.log = same as test.examples but store output in '$(TEST.logdir)/'
43
44 HELP.examples = # no special documentation yet
45 HELP.test.examples.all = # no special documentation yet
46
47 #_____________________________________________________________________________
48 #______________________________________________________ targets for testing __|
49
50 # These tests are not yet added to ALL.tests because most of them are mainly
51 # variants of tests done in other Makefiles. The test targets herein are merely
52 # intended to check if the documented examples will work and return the proper
53 # results.
54 # Following are mainly the examples shown with: o-saft.pl --help=EXAMPLES
55
56 # remember: testarg-% executes:
57 # cd $(TEST.dir) && $(EXE.pl) $(TEST.init) $(TEST.args)
58
59 testarg-example-%: TEST.init = $(TEST.examples.hosts)
60 #testarg-example-%: EXE.pl = ../o-saft.pl
61 # EXE.pl left to default o-saft.pl without path, because this Makefile is
62 # not part of the "tests" target
63
64 # TODO: following targets should be generated like:
65 # $(EXE.pl) --help=EXAMPLES | awk '($1=="o-saft.pl"){sub(/some.tld/,"");print}'
66
67 testarg-example-+cipher: TEST.args = +cipher
68 testarg-example-+info: TEST.args = +info
69 testarg-example-+check: TEST.args = +check
70 testarg-example-+quick: TEST.args = +quick
71 testarg-example-+list: TEST.args = +list
72 testarg-example-+list--v: TEST.args = +list --v
73 testarg-example-+version: TEST.args = +version
74 testarg-example-+version--v: TEST.args = +version --v
75 testarg-example-+help-commands: TEST.args = +help=commands
76 testarg-example-+certificate: TEST.args = +certificate
77 testarg-example-+fingerprint: TEST.args = +fingerprint
78 testarg-example-+after+dates: TEST.args = +after +dates
79 testarg-example-+check--c-RC4: TEST.args = +check --cipher=RC4
80 testarg-example-+sni: TEST.args = +sni
81 testarg-example-+sni_check: TEST.args = +sni_check
82 testarg-example-+sni+cn+altname:TEST.args = +sni +cn +altname
83 testarg-example-+cipher--ena: TEST.args = +cipher --enabled
84 testarg-example-+cipher--dis: TEST.args = +cipher --disabled
85 testarg-example-+cipher--cipher:TEST.args = +cipher --cipher=ADH-AES256-SHA
86 #testarg-example-checkAllCiphers: TEST.args = checkAllCiphers.pl example.tld --range=full --v
87 testarg-example-+cipher-dh: TEST.args = +cipher-dh
88 #testarg-example---lib-_foo: TEST.args = +cipher --lib=/foo/bar-1.42 --exe=/foo/bar-1.42/apps
89 #testarg-example---openssl-foo: TEST.args = --openssl=/foo/bar-1.42/openssl
90 #testarg-example---help-cfg-text: TEST.args = --help=cfg-text >>.o-saft.pl
91 testarg-example-+check--cfg-text: TEST.args = +check --cfg-text=desc="my special description"
92 testarg-example-+check--cfg-hint: TEST.args = +check --cfg-hint=renegotiation="my special hint text"
93 #testarg-example-+cn-hosts: TEST.args = +cn example.tld some.tld other.tld
94 #testarg-example-+cn--showhost: TEST.args = +cn example.tld some.tld other.tld --showhost --no-header
95 testarg-example---legacy-quick1: TEST.args = --legacy=quick --no-header +info
96 testarg-example---legacy-quick2: TEST.args = --legacy=quick --no-header +check
97 testarg-example---legacy-quick3: TEST.args = --legacy=quick --no-header --trace-key +info
98 testarg-example---legacy-quick4: TEST.args = --legacy=quick --no-header --trace-key +check
99 testarg-example---legacy-quick5: TEST.args = --legacy=quick --no-header --trace-key --showhost +check some.tld other.tld
100 testarg-example-+fingerprint-raw: TEST.args = +fingerprint --format=raw
101 testarg-example---exitcode: TEST.args = +check --exitcode
102 testarg-example---exitcode-v: TEST.args = +check --exitcode --exitcode-v
103 testarg-example---exitcode--ignore-out: TEST.args = +check --exitcode --ignore-out=ev- --ignore-out=rfc_7525
104 testarg-example---exitcode-no-prot: TEST.args = +cipher --exitcode --exitcode-no-prot
105 testarg-example-+info--no-rc: TEST.args = +info --no-rc
106 testarg-example-+info--trace: TEST.args = +info --trace
107 testarg-example-+info--trace-key: TEST.args = +info --trace-key
108 testarg-example-+info--trace-arg: TEST.args = +info --trace-arg
109 testarg-example-+info--trace-cmd: TEST.args = +info --trace-cmd
110 testarg-example-+info--trace-time: TEST.args = +info --trace-time
111 testarg-example-+info--no-cert: TEST.args = +info --no-cert --no-cert --no-cert-text=Value-from-Certificate
112 testarg-example-+info--no-dns: TEST.args = +info --no-dns --no-sni --ignore-no-conn
113 testarg-example-+info--no-http: TEST.args = +info --no-dns --no-sni --no-cert --no-http --no-openssl
114 testarg-example-+chain_verify: TEST.args = +chain_verify +verify +error_verify +chain
115 testarg-example-+cipher--v--v: TEST.args = +cipher --v --v
116 testarg-example-+cn--trace: TEST.args = +cn --trace --trace
117
118 test.examples.log-compare: TEST.target_prefix = testarg-examples
119 test.examples.log-move: TEST.target_prefix = testarg-examples
120 test.examples.log: TEST.target_prefix = testarg-examples
121
122 ALL.testexamples = $(shell awk -F: '/^testarg-example-.*%/{next} /^testarg-example-/{arr[$$1]=1}$(_EXE.print_arr_END.awk)' $(_MYSELF.examples))
123 ALL.test.examples = $(ALL.testexamples)
124 ALL.test.examples.log= $(ALL.test.examples:%=%.log) test.log-compare-hint
125
126 test.examples.all: $(ALL.test.examples)
127 test.examples: test.examples.all
128 test.examples.log: $(ALL.test.examples.log)
129
130 #_____________________________________________________________________________
131 #_____________________________________________________________________ test __|
132
133 # main Makefile not yet feeded
134 #ALL.tests += $(ALL.test.examples)
135 #ALL.tests.log += $(ALL.test.examples.log)
136