| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.154 2020/09/27 20:11:34 rillig Exp $ | | 1 | # $NetBSD: Makefile,v 1.155 2020/09/29 18:16:24 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 |
| @@ -375,47 +375,56 @@ FLAGS.opt-no-action= -n | | | @@ -375,47 +375,56 @@ FLAGS.opt-no-action= -n |
375 | FLAGS.opt-query= -q | | 375 | FLAGS.opt-query= -q |
376 | FLAGS.opt-var-expanded= -v VAR -v VALUE | | 376 | FLAGS.opt-var-expanded= -v VAR -v VALUE |
377 | FLAGS.opt-var-literal= -V VAR -V VALUE | | 377 | FLAGS.opt-var-literal= -V VAR -V VALUE |
378 | FLAGS.opt-warnings-as-errors= -W | | 378 | FLAGS.opt-warnings-as-errors= -W |
379 | FLAGS.order= -j1 | | 379 | FLAGS.order= -j1 |
380 | FLAGS.recursive= -dL | | 380 | FLAGS.recursive= -dL |
381 | FLAGS.sh-leading-plus= -n | | 381 | FLAGS.sh-leading-plus= -n |
382 | FLAGS.vardebug= -k -dv FROM_CMDLINE= | | 382 | FLAGS.vardebug= -k -dv FROM_CMDLINE= |
383 | FLAGS.varmod-match-escape= -dv | | 383 | FLAGS.varmod-match-escape= -dv |
384 | FLAGS.varname-dot-shell= -dpv | | 384 | FLAGS.varname-dot-shell= -dpv |
385 | FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain' | | 385 | FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain' |
386 | | | 386 | |
387 | # Some tests need extra postprocessing. | | 387 | # Some tests need extra postprocessing. |
| | | 388 | SED_CMDS.job-output-long-lines= \ |
| | | 389 | ${:D Job separators on their own line are ok. } \ |
| | | 390 | -e '/^--- job-[ab] ---$$/d' \ |
| | | 391 | ${:D Plain output lines are ok as well. } \ |
| | | 392 | ${:D They may come in multiples of 1024 or as 10000. } \ |
| | | 393 | -e '/^aa*$$/d' \ |
| | | 394 | -e '/^bb*$$/d' \ |
| | | 395 | ${:D The following lines should rather not occur since the job } \ |
| | | 396 | ${:D marker should always be at the beginning of the line. } \ |
| | | 397 | -e '/^aa*--- job-b ---$$/d' \ |
| | | 398 | -e '/^bb*--- job-a ---$$/d' |
388 | SED_CMDS.opt-debug-graph1= \ | | 399 | SED_CMDS.opt-debug-graph1= \ |
389 | -e 's,${.CURDIR},CURDIR,' | | 400 | -e 's,${.CURDIR},CURDIR,' |
390 | SED_CMDS.opt-debug-graph1+= \ | | 401 | SED_CMDS.opt-debug-graph1+= \ |
391 | -e '/Global Variables:/,/Suffixes:/d' | | 402 | -e '/Global Variables:/,/Suffixes:/d' |
392 | SED_CMDS.sh-dots= -e 's,^.*\.\.\.:.*,<normalized: ...: not found>,' | | 403 | SED_CMDS.sh-dots= -e 's,^.*\.\.\.:.*,<normalized: ...: not found>,' |
393 | SED_CMDS.varmod-subst-regex+= \ | | 404 | SED_CMDS.varmod-subst-regex+= \ |
394 | -e 's,\(Regex compilation error:\).*,\1 (details omitted),' | | 405 | -e 's,\(Regex compilation error:\).*,\1 (details omitted),' |
395 | SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,' | | 406 | SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,' |
396 | SED_CMDS.varshell+= -e 's,^${.SHELL:T}: ,,' | | 407 | SED_CMDS.varshell+= -e 's,^${.SHELL:T}: ,,' |
397 | SED_CMDS.varshell+= -e '/command/s,No such.*,not found,' | | 408 | SED_CMDS.varshell+= -e '/command/s,No such.*,not found,' |
398 | SED_CMDS.varname-dot-parsedir= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' | | 409 | SED_CMDS.varname-dot-parsedir= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' |
399 | SED_CMDS.varname-dot-parsefile= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' | | 410 | SED_CMDS.varname-dot-parsefile= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' |
400 | SED_CMDS.varname-dot-shell= -e 's, = /.*, = (details omitted),' | | 411 | SED_CMDS.varname-dot-shell= -e 's, = /.*, = (details omitted),' |
401 | SED_CMDS.varname-dot-shell+= -e 's,"/[^"]*","(details omitted)",' | | 412 | SED_CMDS.varname-dot-shell+= -e 's,"/[^"]*","(details omitted)",' |
402 | SED_CMDS.varname-dot-shell+= -e 's,\[/[^]]*\],[(details omitted)],' | | 413 | SED_CMDS.varname-dot-shell+= -e 's,\[/[^]]*\],[(details omitted)],' |
403 | | | 414 | |
404 | # Some tests need an additional round of postprocessing. | | 415 | # Some tests need an additional round of postprocessing. |
405 | POSTPROC.deptgt-suffixes= \ | | 416 | POSTPROC.deptgt-suffixes= \ |
406 | ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p' | | 417 | ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p' |
407 | POSTPROC.job-output-long-lines= \ | | | |
408 | awk '/^[ab]+--- job-[ab] ---/ { print "bad"; exit }' | | | |
409 | POSTPROC.vardebug= ${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p' | | 418 | POSTPROC.vardebug= ${TOOL_SED} -n -e '/:RELEVANT = yes/,/:RELEVANT = no/p' |
410 | POSTPROC.varmod-match-escape= ${TOOL_SED} -n -e '/^Pattern/p' | | 419 | POSTPROC.varmod-match-escape= ${TOOL_SED} -n -e '/^Pattern/p' |
411 | POSTPROC.varname= ${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p' | | 420 | POSTPROC.varname= ${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p' |
412 | POSTPROC.varname-dot-shell= \ | | 421 | POSTPROC.varname-dot-shell= \ |
413 | awk '/\.SHELL/ || /^ParseReadLine/' | | 422 | awk '/\.SHELL/ || /^ParseReadLine/' |
414 | POSTPROC.varname-empty= ${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p' | | 423 | POSTPROC.varname-empty= ${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p' |
415 | | | 424 | |
416 | # Some tests reuse other tests, which makes them unnecessarily fragile. | | 425 | # Some tests reuse other tests, which makes them unnecessarily fragile. |
417 | export-all.rawout: export.mk | | 426 | export-all.rawout: export.mk |
418 | unexport.rawout: export.mk | | 427 | unexport.rawout: export.mk |
419 | unexport-env.rawout: export.mk | | 428 | unexport-env.rawout: export.mk |
420 | | | 429 | |
421 | # End of the configuration section. | | 430 | # End of the configuration section. |