Mon Nov 2 20:40:10 2020 UTC ()
make(1): remove debugging code from sync-mi


(rillig)
diff -r1.183 -r1.184 src/usr.bin/make/unit-tests/Makefile

cvs diff -r1.183 -r1.184 src/usr.bin/make/unit-tests/Makefile (switch to unified diff)

--- src/usr.bin/make/unit-tests/Makefile 2020/11/02 20:20:42 1.183
+++ src/usr.bin/make/unit-tests/Makefile 2020/11/02 20:40:10 1.184
@@ -1,564 +1,563 @@ @@ -1,564 +1,563 @@
1# $NetBSD: Makefile,v 1.183 2020/11/02 20:20:42 rillig Exp $ 1# $NetBSD: Makefile,v 1.184 2020/11/02 20:40:10 rillig Exp $
2# 2#
3# Unit tests for make(1) 3# Unit tests for make(1)
4# 4#
5# The main targets are: 5# The main targets are:
6# 6#
7# all: 7# all:
8# run all the tests 8# run all the tests
9# test: 9# test:
10# run 'all', and compare to expected results 10# run 'all', and compare to expected results
11# accept: 11# accept:
12# move generated output to expected results 12# move generated output to expected results
13# 13#
14# Settable variables 14# Settable variables
15# 15#
16# TEST_MAKE 16# TEST_MAKE
17# The make program to be tested. 17# The make program to be tested.
18# 18#
19# 19#
20# Adding a test case 20# Adding a test case
21# 21#
22# Each feature should get its own set of tests in its own suitably 22# Each feature should get its own set of tests in its own suitably
23# named makefile (*.mk), with its own set of expected results (*.exp), 23# named makefile (*.mk), with its own set of expected results (*.exp),
24# and it should be added to the TESTS list. 24# and it should be added to the TESTS list.
25# 25#
26# Any added files must also be added to src/distrib/sets/lists/tests/mi. 26# Any added files must also be added to src/distrib/sets/lists/tests/mi.
27# To do that, just run "make sync-mi" in this directory. 27# To do that, just run "make sync-mi" in this directory.
28# 28#
29# A few *.mk files are helper files for other tests (such as include-sub.mk) 29# A few *.mk files are helper files for other tests (such as include-sub.mk)
30# and are thus not added to TESTS. Such files must be ignored in 30# and are thus not added to TESTS. Such files must be ignored in
31# src/tests/usr.bin/make/t_make.sh. 31# src/tests/usr.bin/make/t_make.sh.
32# 32#
33 33
34# Each test is in a sub-makefile. 34# Each test is in a sub-makefile.
35# Keep the list sorted. 35# Keep the list sorted.
36# Any test that is commented out must be ignored in 36# Any test that is commented out must be ignored in
37# src/tests/usr.bin/make/t_make.sh as well. 37# src/tests/usr.bin/make/t_make.sh as well.
38TESTS+= archive 38TESTS+= archive
39TESTS+= archive-suffix 39TESTS+= archive-suffix
40TESTS+= cmd-errors 40TESTS+= cmd-errors
41TESTS+= cmd-interrupt 41TESTS+= cmd-interrupt
42TESTS+= cmdline 42TESTS+= cmdline
43TESTS+= comment 43TESTS+= comment
44TESTS+= cond-cmp-numeric 44TESTS+= cond-cmp-numeric
45TESTS+= cond-cmp-numeric-eq 45TESTS+= cond-cmp-numeric-eq
46TESTS+= cond-cmp-numeric-ge 46TESTS+= cond-cmp-numeric-ge
47TESTS+= cond-cmp-numeric-gt 47TESTS+= cond-cmp-numeric-gt
48TESTS+= cond-cmp-numeric-le 48TESTS+= cond-cmp-numeric-le
49TESTS+= cond-cmp-numeric-lt 49TESTS+= cond-cmp-numeric-lt
50TESTS+= cond-cmp-numeric-ne 50TESTS+= cond-cmp-numeric-ne
51TESTS+= cond-cmp-string 51TESTS+= cond-cmp-string
52TESTS+= cond-cmp-unary 52TESTS+= cond-cmp-unary
53TESTS+= cond-func 53TESTS+= cond-func
54TESTS+= cond-func-commands 54TESTS+= cond-func-commands
55TESTS+= cond-func-defined 55TESTS+= cond-func-defined
56TESTS+= cond-func-empty 56TESTS+= cond-func-empty
57TESTS+= cond-func-exists 57TESTS+= cond-func-exists
58TESTS+= cond-func-make 58TESTS+= cond-func-make
59TESTS+= cond-func-target 59TESTS+= cond-func-target
60TESTS+= cond-late 60TESTS+= cond-late
61TESTS+= cond-op 61TESTS+= cond-op
62TESTS+= cond-op-and 62TESTS+= cond-op-and
63TESTS+= cond-op-not 63TESTS+= cond-op-not
64TESTS+= cond-op-or 64TESTS+= cond-op-or
65TESTS+= cond-op-parentheses 65TESTS+= cond-op-parentheses
66TESTS+= cond-short 66TESTS+= cond-short
67TESTS+= cond-token-number 67TESTS+= cond-token-number
68TESTS+= cond-token-plain 68TESTS+= cond-token-plain
69TESTS+= cond-token-string 69TESTS+= cond-token-string
70TESTS+= cond-token-var 70TESTS+= cond-token-var
71TESTS+= cond-undef-lint 71TESTS+= cond-undef-lint
72TESTS+= cond1 72TESTS+= cond1
73TESTS+= counter 73TESTS+= counter
74TESTS+= counter-append 74TESTS+= counter-append
75TESTS+= dep 75TESTS+= dep
76TESTS+= dep-colon 76TESTS+= dep-colon
77TESTS+= dep-colon-bug-cross-file 77TESTS+= dep-colon-bug-cross-file
78TESTS+= dep-double-colon 78TESTS+= dep-double-colon
79TESTS+= dep-double-colon-indep 79TESTS+= dep-double-colon-indep
80TESTS+= dep-exclam 80TESTS+= dep-exclam
81TESTS+= dep-none 81TESTS+= dep-none
82TESTS+= dep-percent 82TESTS+= dep-percent
83TESTS+= dep-var 83TESTS+= dep-var
84TESTS+= dep-wildcards 84TESTS+= dep-wildcards
85TESTS+= depsrc 85TESTS+= depsrc
86TESTS+= depsrc-end 86TESTS+= depsrc-end
87TESTS+= depsrc-exec 87TESTS+= depsrc-exec
88TESTS+= depsrc-ignore 88TESTS+= depsrc-ignore
89TESTS+= depsrc-made 89TESTS+= depsrc-made
90TESTS+= depsrc-make 90TESTS+= depsrc-make
91TESTS+= depsrc-meta 91TESTS+= depsrc-meta
92TESTS+= depsrc-nometa 92TESTS+= depsrc-nometa
93TESTS+= depsrc-nometa_cmp 93TESTS+= depsrc-nometa_cmp
94TESTS+= depsrc-nopath 94TESTS+= depsrc-nopath
95TESTS+= depsrc-notmain 95TESTS+= depsrc-notmain
96TESTS+= depsrc-optional 96TESTS+= depsrc-optional
97TESTS+= depsrc-phony 97TESTS+= depsrc-phony
98TESTS+= depsrc-precious 98TESTS+= depsrc-precious
99TESTS+= depsrc-recursive 99TESTS+= depsrc-recursive
100TESTS+= depsrc-silent 100TESTS+= depsrc-silent
101TESTS+= depsrc-use 101TESTS+= depsrc-use
102TESTS+= depsrc-usebefore 102TESTS+= depsrc-usebefore
103TESTS+= depsrc-usebefore-double-colon 103TESTS+= depsrc-usebefore-double-colon
104TESTS+= depsrc-wait 104TESTS+= depsrc-wait
105TESTS+= deptgt 105TESTS+= deptgt
106TESTS+= deptgt-begin 106TESTS+= deptgt-begin
107TESTS+= deptgt-default 107TESTS+= deptgt-default
108TESTS+= deptgt-delete_on_error 108TESTS+= deptgt-delete_on_error
109TESTS+= deptgt-end 109TESTS+= deptgt-end
110TESTS+= deptgt-end-jobs 110TESTS+= deptgt-end-jobs
111TESTS+= deptgt-error 111TESTS+= deptgt-error
112TESTS+= deptgt-ignore 112TESTS+= deptgt-ignore
113TESTS+= deptgt-interrupt 113TESTS+= deptgt-interrupt
114TESTS+= deptgt-main 114TESTS+= deptgt-main
115TESTS+= deptgt-makeflags 115TESTS+= deptgt-makeflags
116TESTS+= deptgt-no_parallel 116TESTS+= deptgt-no_parallel
117TESTS+= deptgt-nopath 117TESTS+= deptgt-nopath
118TESTS+= deptgt-notparallel 118TESTS+= deptgt-notparallel
119TESTS+= deptgt-objdir 119TESTS+= deptgt-objdir
120TESTS+= deptgt-order 120TESTS+= deptgt-order
121TESTS+= deptgt-path 121TESTS+= deptgt-path
122TESTS+= deptgt-path-suffix 122TESTS+= deptgt-path-suffix
123TESTS+= deptgt-phony 123TESTS+= deptgt-phony
124TESTS+= deptgt-precious 124TESTS+= deptgt-precious
125TESTS+= deptgt-shell 125TESTS+= deptgt-shell
126TESTS+= deptgt-silent 126TESTS+= deptgt-silent
127TESTS+= deptgt-stale 127TESTS+= deptgt-stale
128TESTS+= deptgt-suffixes 128TESTS+= deptgt-suffixes
129TESTS+= dir 129TESTS+= dir
130TESTS+= dir-expand-path 130TESTS+= dir-expand-path
131TESTS+= directive 131TESTS+= directive
132TESTS+= directive-dinclude 132TESTS+= directive-dinclude
133TESTS+= directive-elif 133TESTS+= directive-elif
134TESTS+= directive-elifdef 134TESTS+= directive-elifdef
135TESTS+= directive-elifmake 135TESTS+= directive-elifmake
136TESTS+= directive-elifndef 136TESTS+= directive-elifndef
137TESTS+= directive-elifnmake 137TESTS+= directive-elifnmake
138TESTS+= directive-else 138TESTS+= directive-else
139TESTS+= directive-endif 139TESTS+= directive-endif
140TESTS+= directive-error 140TESTS+= directive-error
141TESTS+= directive-export 141TESTS+= directive-export
142TESTS+= directive-export-env 142TESTS+= directive-export-env
143TESTS+= directive-export-gmake 143TESTS+= directive-export-gmake
144TESTS+= directive-export-literal 144TESTS+= directive-export-literal
145TESTS+= directive-for 145TESTS+= directive-for
146TESTS+= directive-for-generating-endif 146TESTS+= directive-for-generating-endif
147TESTS+= directive-hyphen-include 147TESTS+= directive-hyphen-include
148TESTS+= directive-if 148TESTS+= directive-if
149TESTS+= directive-ifdef 149TESTS+= directive-ifdef
150TESTS+= directive-ifmake 150TESTS+= directive-ifmake
151TESTS+= directive-ifndef 151TESTS+= directive-ifndef
152TESTS+= directive-ifnmake 152TESTS+= directive-ifnmake
153TESTS+= directive-include 153TESTS+= directive-include
154TESTS+= directive-include-fatal 154TESTS+= directive-include-fatal
155TESTS+= directive-info 155TESTS+= directive-info
156TESTS+= directive-sinclude 156TESTS+= directive-sinclude
157TESTS+= directive-undef 157TESTS+= directive-undef
158TESTS+= directive-unexport 158TESTS+= directive-unexport
159TESTS+= directive-unexport-env 159TESTS+= directive-unexport-env
160TESTS+= directive-warning 160TESTS+= directive-warning
161TESTS+= directives 161TESTS+= directives
162TESTS+= dollar 162TESTS+= dollar
163TESTS+= doterror 163TESTS+= doterror
164TESTS+= dotwait 164TESTS+= dotwait
165TESTS+= envfirst 165TESTS+= envfirst
166TESTS+= error 166TESTS+= error
167TESTS+= # escape # broken by reverting POSIX changes 167TESTS+= # escape # broken by reverting POSIX changes
168TESTS+= export 168TESTS+= export
169TESTS+= export-all 169TESTS+= export-all
170TESTS+= export-env 170TESTS+= export-env
171TESTS+= export-variants 171TESTS+= export-variants
172TESTS+= forloop 172TESTS+= forloop
173TESTS+= forsubst 173TESTS+= forsubst
174TESTS+= hanoi-include 174TESTS+= hanoi-include
175TESTS+= impsrc 175TESTS+= impsrc
176TESTS+= include-main 176TESTS+= include-main
177TESTS+= job-output-long-lines 177TESTS+= job-output-long-lines
178TESTS+= lint 178TESTS+= lint
179TESTS+= make-exported 179TESTS+= make-exported
180TESTS+= moderrs 180TESTS+= moderrs
181TESTS+= modmatch 181TESTS+= modmatch
182TESTS+= modmisc 182TESTS+= modmisc
183TESTS+= modts 183TESTS+= modts
184TESTS+= modword 184TESTS+= modword
185TESTS+= opt 185TESTS+= opt
186TESTS+= opt-backwards 186TESTS+= opt-backwards
187TESTS+= opt-chdir 187TESTS+= opt-chdir
188TESTS+= opt-debug 188TESTS+= opt-debug
189TESTS+= opt-debug-all 189TESTS+= opt-debug-all
190TESTS+= opt-debug-archive 190TESTS+= opt-debug-archive
191TESTS+= opt-debug-curdir 191TESTS+= opt-debug-curdir
192TESTS+= opt-debug-cond 192TESTS+= opt-debug-cond
193TESTS+= opt-debug-dir 193TESTS+= opt-debug-dir
194TESTS+= opt-debug-errors 194TESTS+= opt-debug-errors
195TESTS+= opt-debug-file 195TESTS+= opt-debug-file
196TESTS+= opt-debug-for 196TESTS+= opt-debug-for
197TESTS+= opt-debug-graph1 197TESTS+= opt-debug-graph1
198TESTS+= opt-debug-graph2 198TESTS+= opt-debug-graph2
199TESTS+= opt-debug-graph3 199TESTS+= opt-debug-graph3
200TESTS+= opt-debug-hash 200TESTS+= opt-debug-hash
201TESTS+= opt-debug-jobs 201TESTS+= opt-debug-jobs
202TESTS+= opt-debug-lint 202TESTS+= opt-debug-lint
203TESTS+= opt-debug-loud 203TESTS+= opt-debug-loud
204TESTS+= opt-debug-meta 204TESTS+= opt-debug-meta
205TESTS+= opt-debug-making 205TESTS+= opt-debug-making
206TESTS+= opt-debug-no-rm 206TESTS+= opt-debug-no-rm
207TESTS+= opt-debug-parse 207TESTS+= opt-debug-parse
208TESTS+= opt-debug-suff 208TESTS+= opt-debug-suff
209TESTS+= opt-debug-targets 209TESTS+= opt-debug-targets
210TESTS+= opt-debug-varraw 210TESTS+= opt-debug-varraw
211TESTS+= opt-debug-var 211TESTS+= opt-debug-var
212TESTS+= opt-debug-x-trace 212TESTS+= opt-debug-x-trace
213TESTS+= opt-define 213TESTS+= opt-define
214TESTS+= opt-env 214TESTS+= opt-env
215TESTS+= opt-file 215TESTS+= opt-file
216TESTS+= opt-ignore 216TESTS+= opt-ignore
217TESTS+= opt-include-dir 217TESTS+= opt-include-dir
218TESTS+= opt-jobs 218TESTS+= opt-jobs
219TESTS+= opt-jobs-internal 219TESTS+= opt-jobs-internal
220TESTS+= opt-keep-going 220TESTS+= opt-keep-going
221TESTS+= opt-m-include-dir 221TESTS+= opt-m-include-dir
222TESTS+= opt-no-action 222TESTS+= opt-no-action
223TESTS+= opt-no-action-at-all 223TESTS+= opt-no-action-at-all
224TESTS+= opt-query 224TESTS+= opt-query
225TESTS+= opt-raw 225TESTS+= opt-raw
226TESTS+= opt-silent 226TESTS+= opt-silent
227TESTS+= opt-touch 227TESTS+= opt-touch
228TESTS+= opt-tracefile 228TESTS+= opt-tracefile
229TESTS+= opt-var-expanded 229TESTS+= opt-var-expanded
230TESTS+= opt-var-literal 230TESTS+= opt-var-literal
231TESTS+= opt-warnings-as-errors 231TESTS+= opt-warnings-as-errors
232TESTS+= opt-where-am-i 232TESTS+= opt-where-am-i
233TESTS+= opt-x-reduce-exported 233TESTS+= opt-x-reduce-exported
234TESTS+= order 234TESTS+= order
235TESTS+= parse-var 235TESTS+= parse-var
236TESTS+= phony-end 236TESTS+= phony-end
237TESTS+= posix 237TESTS+= posix
238TESTS+= # posix1 # broken by reverting POSIX changes 238TESTS+= # posix1 # broken by reverting POSIX changes
239TESTS+= qequals 239TESTS+= qequals
240TESTS+= recursive 240TESTS+= recursive
241TESTS+= sh 241TESTS+= sh
242TESTS+= sh-dots 242TESTS+= sh-dots
243TESTS+= sh-jobs 243TESTS+= sh-jobs
244TESTS+= sh-jobs-error 244TESTS+= sh-jobs-error
245TESTS+= sh-leading-at 245TESTS+= sh-leading-at
246TESTS+= sh-leading-hyphen 246TESTS+= sh-leading-hyphen
247TESTS+= sh-leading-plus 247TESTS+= sh-leading-plus
248TESTS+= sh-meta-chars 248TESTS+= sh-meta-chars
249TESTS+= sh-multi-line 249TESTS+= sh-multi-line
250TESTS+= sh-single-line 250TESTS+= sh-single-line
251TESTS+= shell-csh 251TESTS+= shell-csh
252TESTS+= shell-custom 252TESTS+= shell-custom
253TESTS+= shell-ksh 253TESTS+= shell-ksh
254TESTS+= shell-sh 254TESTS+= shell-sh
255TESTS+= suff-add-later 255TESTS+= suff-add-later
256TESTS+= suff-clear-regular 256TESTS+= suff-clear-regular
257TESTS+= suff-clear-single 257TESTS+= suff-clear-single
258TESTS+= suff-lookup 258TESTS+= suff-lookup
259TESTS+= suff-main 259TESTS+= suff-main
260TESTS+= suff-rebuild 260TESTS+= suff-rebuild
261TESTS+= suff-transform-endless 261TESTS+= suff-transform-endless
262TESTS+= suff-transform-expand 262TESTS+= suff-transform-expand
263TESTS+= suff-transform-select 263TESTS+= suff-transform-select
264TESTS+= sunshcmd 264TESTS+= sunshcmd
265TESTS+= ternary 265TESTS+= ternary
266TESTS+= unexport 266TESTS+= unexport
267TESTS+= unexport-env 267TESTS+= unexport-env
268TESTS+= use-inference 268TESTS+= use-inference
269TESTS+= var-class 269TESTS+= var-class
270TESTS+= var-class-cmdline 270TESTS+= var-class-cmdline
271TESTS+= var-class-env 271TESTS+= var-class-env
272TESTS+= var-class-global 272TESTS+= var-class-global
273TESTS+= var-class-local 273TESTS+= var-class-local
274TESTS+= var-class-local-legacy 274TESTS+= var-class-local-legacy
275TESTS+= var-op 275TESTS+= var-op
276TESTS+= var-op-append 276TESTS+= var-op-append
277TESTS+= var-op-assign 277TESTS+= var-op-assign
278TESTS+= var-op-default 278TESTS+= var-op-default
279TESTS+= var-op-expand 279TESTS+= var-op-expand
280TESTS+= var-op-shell 280TESTS+= var-op-shell
281TESTS+= var-op-sunsh 281TESTS+= var-op-sunsh
282TESTS+= var-recursive 282TESTS+= var-recursive
283TESTS+= varcmd 283TESTS+= varcmd
284TESTS+= vardebug 284TESTS+= vardebug
285TESTS+= varfind 285TESTS+= varfind
286TESTS+= varmisc 286TESTS+= varmisc
287TESTS+= varmod 287TESTS+= varmod
288TESTS+= varmod-assign 288TESTS+= varmod-assign
289TESTS+= varmod-defined 289TESTS+= varmod-defined
290TESTS+= varmod-edge 290TESTS+= varmod-edge
291TESTS+= varmod-exclam-shell 291TESTS+= varmod-exclam-shell
292TESTS+= varmod-extension 292TESTS+= varmod-extension
293TESTS+= varmod-gmtime 293TESTS+= varmod-gmtime
294TESTS+= varmod-hash 294TESTS+= varmod-hash
295TESTS+= varmod-head 295TESTS+= varmod-head
296TESTS+= varmod-ifelse 296TESTS+= varmod-ifelse
297TESTS+= varmod-l-name-to-value 297TESTS+= varmod-l-name-to-value
298TESTS+= varmod-localtime 298TESTS+= varmod-localtime
299TESTS+= varmod-loop 299TESTS+= varmod-loop
300TESTS+= varmod-match 300TESTS+= varmod-match
301TESTS+= varmod-match-escape 301TESTS+= varmod-match-escape
302TESTS+= varmod-no-match 302TESTS+= varmod-no-match
303TESTS+= varmod-order 303TESTS+= varmod-order
304TESTS+= varmod-order-reverse 304TESTS+= varmod-order-reverse
305TESTS+= varmod-order-shuffle 305TESTS+= varmod-order-shuffle
306TESTS+= varmod-path 306TESTS+= varmod-path
307TESTS+= varmod-quote 307TESTS+= varmod-quote
308TESTS+= varmod-quote-dollar 308TESTS+= varmod-quote-dollar
309TESTS+= varmod-range 309TESTS+= varmod-range
310TESTS+= varmod-remember 310TESTS+= varmod-remember
311TESTS+= varmod-root 311TESTS+= varmod-root
312TESTS+= varmod-select-words 312TESTS+= varmod-select-words
313TESTS+= varmod-shell 313TESTS+= varmod-shell
314TESTS+= varmod-subst 314TESTS+= varmod-subst
315TESTS+= varmod-subst-regex 315TESTS+= varmod-subst-regex
316TESTS+= varmod-sysv 316TESTS+= varmod-sysv
317TESTS+= varmod-tail 317TESTS+= varmod-tail
318TESTS+= varmod-to-abs 318TESTS+= varmod-to-abs
319TESTS+= varmod-to-lower 319TESTS+= varmod-to-lower
320TESTS+= varmod-to-many-words 320TESTS+= varmod-to-many-words
321TESTS+= varmod-to-one-word 321TESTS+= varmod-to-one-word
322TESTS+= varmod-to-separator 322TESTS+= varmod-to-separator
323TESTS+= varmod-to-upper 323TESTS+= varmod-to-upper
324TESTS+= varmod-undefined 324TESTS+= varmod-undefined
325TESTS+= varmod-unique 325TESTS+= varmod-unique
326TESTS+= varname 326TESTS+= varname
327TESTS+= varname-dollar 327TESTS+= varname-dollar
328TESTS+= varname-dot-alltargets 328TESTS+= varname-dot-alltargets
329TESTS+= varname-dot-curdir 329TESTS+= varname-dot-curdir
330TESTS+= varname-dot-includes 330TESTS+= varname-dot-includes
331TESTS+= varname-dot-includedfromdir 331TESTS+= varname-dot-includedfromdir
332TESTS+= varname-dot-includedfromfile 332TESTS+= varname-dot-includedfromfile
333TESTS+= varname-dot-libs 333TESTS+= varname-dot-libs
334TESTS+= varname-dot-make-dependfile 334TESTS+= varname-dot-make-dependfile
335TESTS+= varname-dot-make-expand_variables 335TESTS+= varname-dot-make-expand_variables
336TESTS+= varname-dot-make-exported 336TESTS+= varname-dot-make-exported
337TESTS+= varname-dot-make-jobs 337TESTS+= varname-dot-make-jobs
338TESTS+= varname-dot-make-jobs-prefix 338TESTS+= varname-dot-make-jobs-prefix
339TESTS+= varname-dot-make-level 339TESTS+= varname-dot-make-level
340TESTS+= varname-dot-make-makefile_preference 340TESTS+= varname-dot-make-makefile_preference
341TESTS+= varname-dot-make-makefiles 341TESTS+= varname-dot-make-makefiles
342TESTS+= varname-dot-make-meta-bailiwick 342TESTS+= varname-dot-make-meta-bailiwick
343TESTS+= varname-dot-make-meta-created 343TESTS+= varname-dot-make-meta-created
344TESTS+= varname-dot-make-meta-files 344TESTS+= varname-dot-make-meta-files
345TESTS+= varname-dot-make-meta-ignore_filter 345TESTS+= varname-dot-make-meta-ignore_filter
346TESTS+= varname-dot-make-meta-ignore_paths 346TESTS+= varname-dot-make-meta-ignore_paths
347TESTS+= varname-dot-make-meta-ignore_patterns 347TESTS+= varname-dot-make-meta-ignore_patterns
348TESTS+= varname-dot-make-meta-prefix 348TESTS+= varname-dot-make-meta-prefix
349TESTS+= varname-dot-make-mode 349TESTS+= varname-dot-make-mode
350TESTS+= varname-dot-make-path_filemon 350TESTS+= varname-dot-make-path_filemon
351TESTS+= varname-dot-make-pid 351TESTS+= varname-dot-make-pid
352TESTS+= varname-dot-make-ppid 352TESTS+= varname-dot-make-ppid
353TESTS+= varname-dot-make-save_dollars 353TESTS+= varname-dot-make-save_dollars
354TESTS+= varname-dot-makeoverrides 354TESTS+= varname-dot-makeoverrides
355TESTS+= varname-dot-newline 355TESTS+= varname-dot-newline
356TESTS+= varname-dot-objdir 356TESTS+= varname-dot-objdir
357TESTS+= varname-dot-parsedir 357TESTS+= varname-dot-parsedir
358TESTS+= varname-dot-parsefile 358TESTS+= varname-dot-parsefile
359TESTS+= varname-dot-path 359TESTS+= varname-dot-path
360TESTS+= varname-dot-shell 360TESTS+= varname-dot-shell
361TESTS+= varname-dot-targets 361TESTS+= varname-dot-targets
362TESTS+= varname-empty 362TESTS+= varname-empty
363TESTS+= varname-make 363TESTS+= varname-make
364TESTS+= varname-make_print_var_on_error 364TESTS+= varname-make_print_var_on_error
365TESTS+= varname-make_print_var_on_error-jobs 365TESTS+= varname-make_print_var_on_error-jobs
366TESTS+= varname-makefile 366TESTS+= varname-makefile
367TESTS+= varname-makeflags 367TESTS+= varname-makeflags
368TESTS+= varname-pwd 368TESTS+= varname-pwd
369TESTS+= varname-vpath 369TESTS+= varname-vpath
370TESTS+= varparse-dynamic 370TESTS+= varparse-dynamic
371TESTS+= varparse-mod 371TESTS+= varparse-mod
372TESTS+= varparse-undef-partial 372TESTS+= varparse-undef-partial
373TESTS+= varquote 373TESTS+= varquote
374TESTS+= varshell 374TESTS+= varshell
375 375
376# Additional environment variables for some of the tests. 376# Additional environment variables for some of the tests.
377# The base environment is -i PATH="$PATH". 377# The base environment is -i PATH="$PATH".
378ENV.envfirst= FROM_ENV=value-from-env 378ENV.envfirst= FROM_ENV=value-from-env
379ENV.varmisc= FROM_ENV=env 379ENV.varmisc= FROM_ENV=env
380ENV.varmisc+= FROM_ENV_BEFORE=env 380ENV.varmisc+= FROM_ENV_BEFORE=env
381ENV.varmisc+= FROM_ENV_AFTER=env 381ENV.varmisc+= FROM_ENV_AFTER=env
382ENV.varmod-localtime+= TZ=Europe/Berlin 382ENV.varmod-localtime+= TZ=Europe/Berlin
383 383
384# Override make flags for some of the tests; default is -k. 384# Override make flags for some of the tests; default is -k.
385# If possible, write ".MAKEFLAGS: -dv" in the test .mk file instead of 385# If possible, write ".MAKEFLAGS: -dv" in the test .mk file instead of
386# settings FLAGS.test=-dv here, since that is closer to the test code. 386# settings FLAGS.test=-dv here, since that is closer to the test code.
387FLAGS.cond-func-make= via-cmdline 387FLAGS.cond-func-make= via-cmdline
388FLAGS.directive-ifmake= first second 388FLAGS.directive-ifmake= first second
389FLAGS.doterror= # none 389FLAGS.doterror= # none
390FLAGS.envfirst= -e 390FLAGS.envfirst= -e
391FLAGS.export= # none 391FLAGS.export= # none
392FLAGS.opt-ignore= -i 392FLAGS.opt-ignore= -i
393FLAGS.opt-keep-going= -k 393FLAGS.opt-keep-going= -k
394FLAGS.opt-no-action= -n 394FLAGS.opt-no-action= -n
395FLAGS.opt-query= -q 395FLAGS.opt-query= -q
396FLAGS.opt-var-expanded= -v VAR -v VALUE 396FLAGS.opt-var-expanded= -v VAR -v VALUE
397FLAGS.opt-var-literal= -V VAR -V VALUE 397FLAGS.opt-var-literal= -V VAR -V VALUE
398FLAGS.opt-warnings-as-errors= -W 398FLAGS.opt-warnings-as-errors= -W
399FLAGS.order= -j1 399FLAGS.order= -j1
400FLAGS.recursive= -dL 400FLAGS.recursive= -dL
401FLAGS.sh-leading-plus= -n 401FLAGS.sh-leading-plus= -n
402FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain' 402FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain'
403 403
404# Some tests need extra postprocessing. 404# Some tests need extra postprocessing.
405SED_CMDS.job-output-long-lines= \ 405SED_CMDS.job-output-long-lines= \
406 ${:D Job separators on their own line are ok. } \ 406 ${:D Job separators on their own line are ok. } \
407 -e '/^--- job-[ab] ---$$/d' \ 407 -e '/^--- job-[ab] ---$$/d' \
408 ${:D Plain output lines are ok as well. } \ 408 ${:D Plain output lines are ok as well. } \
409 ${:D They may come in multiples of 1024 or as 10000. } \ 409 ${:D They may come in multiples of 1024 or as 10000. } \
410 -e '/^aa*$$/d' \ 410 -e '/^aa*$$/d' \
411 -e '/^bb*$$/d' \ 411 -e '/^bb*$$/d' \
412 ${:D The following lines should rather not occur since the job } \ 412 ${:D The following lines should rather not occur since the job } \
413 ${:D marker should always be at the beginning of the line. } \ 413 ${:D marker should always be at the beginning of the line. } \
414 -e '/^aa*--- job-b ---$$/d' \ 414 -e '/^aa*--- job-b ---$$/d' \
415 -e '/^bb*--- job-a ---$$/d' 415 -e '/^bb*--- job-a ---$$/d'
416SED_CMDS.opt-debug-graph1= \ 416SED_CMDS.opt-debug-graph1= \
417 -e 's,${.CURDIR},CURDIR,' 417 -e 's,${.CURDIR},CURDIR,'
418SED_CMDS.opt-debug-graph1+= \ 418SED_CMDS.opt-debug-graph1+= \
419 -e '/Global Variables:/,/Suffixes:/d' 419 -e '/Global Variables:/,/Suffixes:/d'
420SED_CMDS.sh-dots= -e 's,^.*\.\.\.:.*,<normalized: ...: not found>,' 420SED_CMDS.sh-dots= -e 's,^.*\.\.\.:.*,<normalized: ...: not found>,'
421SED_CMDS.opt-debug-jobs= -e 's,([0-9][0-9]*),(<pid>),' 421SED_CMDS.opt-debug-jobs= -e 's,([0-9][0-9]*),(<pid>),'
422SED_CMDS.opt-debug-jobs+= -e 's,pid [0-9][0-9]*,pid <pid>,' 422SED_CMDS.opt-debug-jobs+= -e 's,pid [0-9][0-9]*,pid <pid>,'
423SED_CMDS.opt-debug-jobs+= -e 's,Process [0-9][0-9]*,Process <pid>,' 423SED_CMDS.opt-debug-jobs+= -e 's,Process [0-9][0-9]*,Process <pid>,'
424SED_CMDS.opt-debug-jobs+= -e 's,JobFinish: [0-9][0-9]*,JobFinish: <pid>,' 424SED_CMDS.opt-debug-jobs+= -e 's,JobFinish: [0-9][0-9]*,JobFinish: <pid>,'
425# The "-q" may be there or not, see jobs.c, variable shells. 425# The "-q" may be there or not, see jobs.c, variable shells.
426SED_CMDS.opt-debug-jobs+= -e 's,^\(.Command: sh\) -q,\1,' 426SED_CMDS.opt-debug-jobs+= -e 's,^\(.Command: sh\) -q,\1,'
427SED_CMDS.varmod-subst-regex+= \ 427SED_CMDS.varmod-subst-regex+= \
428 -e 's,\(Regex compilation error:\).*,\1 (details omitted),' 428 -e 's,\(Regex compilation error:\).*,\1 (details omitted),'
429SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,' 429SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,'
430SED_CMDS.varshell+= -e 's,^${.SHELL:T}: ,,' 430SED_CMDS.varshell+= -e 's,^${.SHELL:T}: ,,'
431SED_CMDS.varshell+= -e '/command/s,No such.*,not found,' 431SED_CMDS.varshell+= -e '/command/s,No such.*,not found,'
432SED_CMDS.varname-dot-parsedir= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' 432SED_CMDS.varname-dot-parsedir= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,'
433SED_CMDS.varname-dot-parsefile= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' 433SED_CMDS.varname-dot-parsefile= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,'
434SED_CMDS.varname-dot-shell= -e 's, = /[^ ]*, = (details omitted),g' 434SED_CMDS.varname-dot-shell= -e 's, = /[^ ]*, = (details omitted),g'
435SED_CMDS.varname-dot-shell+= -e 's,"/[^" ]*","(details omitted)",g' 435SED_CMDS.varname-dot-shell+= -e 's,"/[^" ]*","(details omitted)",g'
436SED_CMDS.varname-dot-shell+= -e 's,\[/[^] ]*\],[(details omitted)],g' 436SED_CMDS.varname-dot-shell+= -e 's,\[/[^] ]*\],[(details omitted)],g'
437 437
438# Some tests need an additional round of postprocessing. 438# Some tests need an additional round of postprocessing.
439POSTPROC.deptgt-suffixes= \ 439POSTPROC.deptgt-suffixes= \
440 ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p' 440 ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p'
441POSTPROC.varname= ${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p' 441POSTPROC.varname= ${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p'
442POSTPROC.varname-empty= ${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p' 442POSTPROC.varname-empty= ${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p'
443 443
444# Some tests reuse other tests, which makes them unnecessarily fragile. 444# Some tests reuse other tests, which makes them unnecessarily fragile.
445export-all.rawout: export.mk 445export-all.rawout: export.mk
446unexport.rawout: export.mk 446unexport.rawout: export.mk
447unexport-env.rawout: export.mk 447unexport-env.rawout: export.mk
448 448
449# End of the configuration section. 449# End of the configuration section.
450 450
451.MAIN: all 451.MAIN: all
452 452
453UNIT_TESTS:= ${.PARSEDIR} 453UNIT_TESTS:= ${.PARSEDIR}
454.PATH: ${UNIT_TESTS} 454.PATH: ${UNIT_TESTS}
455 455
456.if ${USE_ABSOLUTE_TESTNAMES:Uno} == yes 456.if ${USE_ABSOLUTE_TESTNAMES:Uno} == yes
457OUTFILES= ${TESTS:@test@${.CURDIR:tA}/${test}.out@} 457OUTFILES= ${TESTS:@test@${.CURDIR:tA}/${test}.out@}
458.else 458.else
459OUTFILES= ${TESTS:=.out} 459OUTFILES= ${TESTS:=.out}
460.endif 460.endif
461 461
462all: ${OUTFILES} 462all: ${OUTFILES}
463 463
464CLEANFILES= *.rawout *.out *.status *.tmp *.core *.tmp 464CLEANFILES= *.rawout *.out *.status *.tmp *.core *.tmp
465CLEANFILES+= obj*.[och] lib*.a # posix1.mk 465CLEANFILES+= obj*.[och] lib*.a # posix1.mk
466CLEANFILES+= issue* .[ab]* # suffixes.mk 466CLEANFILES+= issue* .[ab]* # suffixes.mk
467CLEANDIRS= dir dummy # posix1.mk 467CLEANDIRS= dir dummy # posix1.mk
468 468
469clean: 469clean:
470 rm -f ${CLEANFILES} 470 rm -f ${CLEANFILES}
471 rm -rf ${CLEANDIRS} 471 rm -rf ${CLEANDIRS}
472 472
473TEST_MAKE?= ${.MAKE} 473TEST_MAKE?= ${.MAKE}
474TOOL_SED?= sed 474TOOL_SED?= sed
475 475
476# ensure consistent results from sort(1) 476# ensure consistent results from sort(1)
477LC_ALL= C 477LC_ALL= C
478LANG= C 478LANG= C
479.export LANG LC_ALL 479.export LANG LC_ALL
480 480
481MAKE_TEST_ENV?= MALLOC_OPTIONS="JA" # for jemalloc 481MAKE_TEST_ENV?= MALLOC_OPTIONS="JA" # for jemalloc
482 482
483# Each test is run in a sub-make, to keep the tests for interfering with 483# Each test is run in a sub-make, to keep the tests for interfering with
484# each other, and because they use different environment variables and 484# each other, and because they use different environment variables and
485# command line options. 485# command line options.
486.SUFFIXES: .mk .rawout .out 486.SUFFIXES: .mk .rawout .out
487.mk.rawout: 487.mk.rawout:
488 @${_MKMSG_TEST:Uecho '# test '} ${.PREFIX} 488 @${_MKMSG_TEST:Uecho '# test '} ${.PREFIX}
489 @set -eu; \ 489 @set -eu; \
490 cd ${.OBJDIR}; \ 490 cd ${.OBJDIR}; \
491 env -i PATH="$$PATH" ${MAKE_TEST_ENV} ${ENV.${.PREFIX:T}} \ 491 env -i PATH="$$PATH" ${MAKE_TEST_ENV} ${ENV.${.PREFIX:T}} \
492 ${TEST_MAKE} \ 492 ${TEST_MAKE} \
493 -r -C ${.CURDIR} -f ${.IMPSRC} \ 493 -r -C ${.CURDIR} -f ${.IMPSRC} \
494 ${FLAGS.${.PREFIX:T}:U-k} \ 494 ${FLAGS.${.PREFIX:T}:U-k} \
495 > ${.TARGET}.tmp 2>&1 \ 495 > ${.TARGET}.tmp 2>&1 \
496 && status=$$? || status=$$?; \ 496 && status=$$? || status=$$?; \
497 echo $$status > ${.TARGET:R}.status 497 echo $$status > ${.TARGET:R}.status
498 @mv ${.TARGET}.tmp ${.TARGET} 498 @mv ${.TARGET}.tmp ${.TARGET}
499 499
500# Postprocess the test output so that the results can be compared. 500# Postprocess the test output so that the results can be compared.
501# 501#
502# always pretend .MAKE was called 'make' 502# always pretend .MAKE was called 'make'
503_SED_CMDS+= -e 's,^${TEST_MAKE:T:S,.,\\.,g}[][0-9]*:,make:,' 503_SED_CMDS+= -e 's,^${TEST_MAKE:T:S,.,\\.,g}[][0-9]*:,make:,'
504_SED_CMDS+= -e 's,${TEST_MAKE:S,.,\\.,g},make,' 504_SED_CMDS+= -e 's,${TEST_MAKE:S,.,\\.,g},make,'
505# replace anything after 'stopped in' with unit-tests 505# replace anything after 'stopped in' with unit-tests
506_SED_CMDS+= -e '/stopped/s, /.*, unit-tests,' 506_SED_CMDS+= -e '/stopped/s, /.*, unit-tests,'
507# strip ${.CURDIR}/ from the output 507# strip ${.CURDIR}/ from the output
508_SED_CMDS+= -e 's,${.CURDIR:S,.,\\.,g}/,,g' 508_SED_CMDS+= -e 's,${.CURDIR:S,.,\\.,g}/,,g'
509_SED_CMDS+= -e 's,${UNIT_TESTS:S,.,\\.,g}/,,g' 509_SED_CMDS+= -e 's,${UNIT_TESTS:S,.,\\.,g}/,,g'
510 510
511.rawout.out: 511.rawout.out:
512 @${TOOL_SED} ${_SED_CMDS} ${SED_CMDS.${.PREFIX:T}} \ 512 @${TOOL_SED} ${_SED_CMDS} ${SED_CMDS.${.PREFIX:T}} \
513 < ${.IMPSRC} > ${.TARGET}.tmp1 513 < ${.IMPSRC} > ${.TARGET}.tmp1
514 @${POSTPROC.${.PREFIX:T}:Ucat} < ${.TARGET}.tmp1 > ${.TARGET}.tmp2 514 @${POSTPROC.${.PREFIX:T}:Ucat} < ${.TARGET}.tmp1 > ${.TARGET}.tmp2
515 @rm ${.TARGET}.tmp1 515 @rm ${.TARGET}.tmp1
516 @echo "exit status `cat ${.TARGET:R}.status`" >> ${.TARGET}.tmp2 516 @echo "exit status `cat ${.TARGET:R}.status`" >> ${.TARGET}.tmp2
517 @mv ${.TARGET}.tmp2 ${.TARGET} 517 @mv ${.TARGET}.tmp2 ${.TARGET}
518 518
519# Compare all output files 519# Compare all output files
520test: ${OUTFILES} .PHONY 520test: ${OUTFILES} .PHONY
521 @failed= ; \ 521 @failed= ; \
522 for test in ${TESTS}; do \ 522 for test in ${TESTS}; do \
523 diff -u ${UNIT_TESTS}/$${test}.exp $${test}.out \ 523 diff -u ${UNIT_TESTS}/$${test}.exp $${test}.out \
524 || failed="$${failed}$${failed:+ }$${test}" ; \ 524 || failed="$${failed}$${failed:+ }$${test}" ; \
525 done ; \ 525 done ; \
526 if [ -n "$${failed}" ]; then \ 526 if [ -n "$${failed}" ]; then \
527 echo "Failed tests: $${failed}" ; false ; \ 527 echo "Failed tests: $${failed}" ; false ; \
528 else \ 528 else \
529 echo "All tests passed" ; \ 529 echo "All tests passed" ; \
530 fi 530 fi
531 531
532accept: 532accept:
533 @for test in ${TESTS}; do \ 533 @for test in ${TESTS}; do \
534 cmp -s ${UNIT_TESTS}/$${test}.exp $${test}.out \ 534 cmp -s ${UNIT_TESTS}/$${test}.exp $${test}.out \
535 || { echo "Replacing $${test}.exp" ; \ 535 || { echo "Replacing $${test}.exp" ; \
536 cp $${test}.out ${UNIT_TESTS}/$${test}.exp ; } \ 536 cp $${test}.out ${UNIT_TESTS}/$${test}.exp ; } \
537 done 537 done
538 538
539# Note: only works for adding tests. 539# Note: only works for adding tests.
540# To remove a test, the $$mi file must be edited manually. 540# To remove a test, the $$mi file must be edited manually.
541sync-mi: 541sync-mi:
542 @set -eu; \ 542 @set -eu; \
543 cd "${MAKEFILE:tA:H}/../../.."; \ 543 cd "${MAKEFILE:tA:H}/../../.."; \
544 mi="distrib/sets/lists/tests/mi"; \ 544 mi="distrib/sets/lists/tests/mi"; \
545 cvs update "$$mi"; \ 545 cvs update "$$mi"; \
546 testsdir="usr.bin/make/unit-tests"; \ 546 testsdir="usr.bin/make/unit-tests"; \
547 fmt="./usr/tests/$$testsdir/%s\ttests-usr.bin-tests\tcompattestfile,atf\\n"; \ 547 fmt="./usr/tests/$$testsdir/%s\ttests-usr.bin-tests\tcompattestfile,atf\\n"; \
548 cat "$$mi" > "$$mi.tmp"; \ 548 cat "$$mi" > "$$mi.tmp"; \
549 (cd "$$testsdir" && ls *.exp *.mk) | xargs printf "$$fmt" >> "$$mi.tmp"; \ 549 (cd "$$testsdir" && ls *.exp *.mk) | xargs printf "$$fmt" >> "$$mi.tmp"; \
550 distrib/sets/fmt-list "$$mi.tmp"; \ 550 distrib/sets/fmt-list "$$mi.tmp"; \
551 echo $$?; \ 
552 mv "$$mi.tmp" "$$mi"; \ 551 mv "$$mi.tmp" "$$mi"; \
553 cvs diff "$$mi" || true 552 cvs diff "$$mi" || true
554 553
555.if exists(${TEST_MAKE}) 554.if exists(${TEST_MAKE})
556${TESTS:=.rawout}: ${TEST_MAKE} 555${TESTS:=.rawout}: ${TEST_MAKE}
557# in meta mode, we *know* if a target script is impacted 556# in meta mode, we *know* if a target script is impacted
558# by a makefile change. 557# by a makefile change.
559.if ${.MAKE.MODE:Unormal:Mmeta} == "" 558.if ${.MAKE.MODE:Unormal:Mmeta} == ""
560${TESTS:=.rawout}: ${.PARSEDIR}/Makefile 559${TESTS:=.rawout}: ${.PARSEDIR}/Makefile
561.endif 560.endif
562.endif 561.endif
563 562
564.-include <bsd.obj.mk> 563.-include <bsd.obj.mk>