| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.180 2020/10/31 20:30:06 rillig Exp $ | | 1 | # $NetBSD: Makefile,v 1.181 2020/11/01 19:02:22 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 |
| @@ -388,27 +388,26 @@ FLAGS.directive-ifmake= first second | | | @@ -388,27 +388,26 @@ FLAGS.directive-ifmake= first second |
388 | FLAGS.doterror= # none | | 388 | FLAGS.doterror= # none |
389 | FLAGS.envfirst= -e | | 389 | FLAGS.envfirst= -e |
390 | FLAGS.export= # none | | 390 | FLAGS.export= # none |
391 | FLAGS.opt-ignore= -i | | 391 | FLAGS.opt-ignore= -i |
392 | FLAGS.opt-keep-going= -k | | 392 | FLAGS.opt-keep-going= -k |
393 | FLAGS.opt-no-action= -n | | 393 | FLAGS.opt-no-action= -n |
394 | FLAGS.opt-query= -q | | 394 | FLAGS.opt-query= -q |
395 | FLAGS.opt-var-expanded= -v VAR -v VALUE | | 395 | FLAGS.opt-var-expanded= -v VAR -v VALUE |
396 | FLAGS.opt-var-literal= -V VAR -V VALUE | | 396 | FLAGS.opt-var-literal= -V VAR -V VALUE |
397 | FLAGS.opt-warnings-as-errors= -W | | 397 | FLAGS.opt-warnings-as-errors= -W |
398 | FLAGS.order= -j1 | | 398 | FLAGS.order= -j1 |
399 | FLAGS.recursive= -dL | | 399 | FLAGS.recursive= -dL |
400 | FLAGS.sh-leading-plus= -n | | 400 | FLAGS.sh-leading-plus= -n |
401 | FLAGS.varmod-match-escape= -dv | | | |
402 | FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain' | | 401 | FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain' |
403 | | | 402 | |
404 | # Some tests need extra postprocessing. | | 403 | # Some tests need extra postprocessing. |
405 | SED_CMDS.job-output-long-lines= \ | | 404 | SED_CMDS.job-output-long-lines= \ |
406 | ${:D Job separators on their own line are ok. } \ | | 405 | ${:D Job separators on their own line are ok. } \ |
407 | -e '/^--- job-[ab] ---$$/d' \ | | 406 | -e '/^--- job-[ab] ---$$/d' \ |
408 | ${:D Plain output lines are ok as well. } \ | | 407 | ${:D Plain output lines are ok as well. } \ |
409 | ${:D They may come in multiples of 1024 or as 10000. } \ | | 408 | ${:D They may come in multiples of 1024 or as 10000. } \ |
410 | -e '/^aa*$$/d' \ | | 409 | -e '/^aa*$$/d' \ |
411 | -e '/^bb*$$/d' \ | | 410 | -e '/^bb*$$/d' \ |
412 | ${:D The following lines should rather not occur since the job } \ | | 411 | ${:D The following lines should rather not occur since the job } \ |
413 | ${:D marker should always be at the beginning of the line. } \ | | 412 | ${:D marker should always be at the beginning of the line. } \ |
414 | -e '/^aa*--- job-b ---$$/d' \ | | 413 | -e '/^aa*--- job-b ---$$/d' \ |
| @@ -428,27 +427,26 @@ SED_CMDS.varmod-subst-regex+= \ | | | @@ -428,27 +427,26 @@ SED_CMDS.varmod-subst-regex+= \ |
428 | -e 's,\(Regex compilation error:\).*,\1 (details omitted),' | | 427 | -e 's,\(Regex compilation error:\).*,\1 (details omitted),' |
429 | SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,' | | 428 | SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,' |
430 | SED_CMDS.varshell+= -e 's,^${.SHELL:T}: ,,' | | 429 | SED_CMDS.varshell+= -e 's,^${.SHELL:T}: ,,' |
431 | SED_CMDS.varshell+= -e '/command/s,No such.*,not found,' | | 430 | SED_CMDS.varshell+= -e '/command/s,No such.*,not found,' |
432 | SED_CMDS.varname-dot-parsedir= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' | | 431 | SED_CMDS.varname-dot-parsedir= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' |
433 | SED_CMDS.varname-dot-parsefile= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' | | 432 | SED_CMDS.varname-dot-parsefile= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' |
434 | SED_CMDS.varname-dot-shell= -e 's, = /[^ ]*, = (details omitted),g' | | 433 | SED_CMDS.varname-dot-shell= -e 's, = /[^ ]*, = (details omitted),g' |
435 | SED_CMDS.varname-dot-shell+= -e 's,"/[^" ]*","(details omitted)",g' | | 434 | SED_CMDS.varname-dot-shell+= -e 's,"/[^" ]*","(details omitted)",g' |
436 | SED_CMDS.varname-dot-shell+= -e 's,\[/[^] ]*\],[(details omitted)],g' | | 435 | SED_CMDS.varname-dot-shell+= -e 's,\[/[^] ]*\],[(details omitted)],g' |
437 | | | 436 | |
438 | # Some tests need an additional round of postprocessing. | | 437 | # Some tests need an additional round of postprocessing. |
439 | POSTPROC.deptgt-suffixes= \ | | 438 | POSTPROC.deptgt-suffixes= \ |
440 | ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p' | | 439 | ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p' |
441 | POSTPROC.varmod-match-escape= ${TOOL_SED} -n -e '/^Pattern/p' | | | |
442 | POSTPROC.varname= ${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p' | | 440 | POSTPROC.varname= ${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p' |
443 | POSTPROC.varname-empty= ${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p' | | 441 | POSTPROC.varname-empty= ${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p' |
444 | | | 442 | |
445 | # Some tests reuse other tests, which makes them unnecessarily fragile. | | 443 | # Some tests reuse other tests, which makes them unnecessarily fragile. |
446 | export-all.rawout: export.mk | | 444 | export-all.rawout: export.mk |
447 | unexport.rawout: export.mk | | 445 | unexport.rawout: export.mk |
448 | unexport-env.rawout: export.mk | | 446 | unexport-env.rawout: export.mk |
449 | | | 447 | |
450 | # End of the configuration section. | | 448 | # End of the configuration section. |
451 | | | 449 | |
452 | .MAIN: all | | 450 | .MAIN: all |
453 | | | 451 | |
454 | UNIT_TESTS:= ${.PARSEDIR} | | 452 | UNIT_TESTS:= ${.PARSEDIR} |