| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.206 2020/11/18 01:12:00 sjg Exp $ | | 1 | # $NetBSD: Makefile,v 1.207 2020/11/18 04:10:34 sjg 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 |
| @@ -418,27 +418,27 @@ ENV.varmisc+= FROM_ENV_AFTER=env | | | @@ -418,27 +418,27 @@ ENV.varmisc+= FROM_ENV_AFTER=env |
418 | ENV.varmod-localtime+= TZ=Europe/Berlin | | 418 | ENV.varmod-localtime+= TZ=Europe/Berlin |
419 | ENV.varname-vpath+= VPATH=varname-vpath.dir:varname-vpath.dir2 | | 419 | ENV.varname-vpath+= VPATH=varname-vpath.dir:varname-vpath.dir2 |
420 | | | 420 | |
421 | # Override make flags for some of the tests; default is -k. | | 421 | # Override make flags for some of the tests; default is -k. |
422 | # If possible, write ".MAKEFLAGS: -dv" in the test .mk file instead of | | 422 | # If possible, write ".MAKEFLAGS: -dv" in the test .mk file instead of |
423 | # settings FLAGS.test=-dv here, since that is closer to the test code. | | 423 | # settings FLAGS.test=-dv here, since that is closer to the test code. |
424 | FLAGS.cond-func-make= via-cmdline | | 424 | FLAGS.cond-func-make= via-cmdline |
425 | FLAGS.directive-ifmake= first second | | 425 | FLAGS.directive-ifmake= first second |
426 | FLAGS.doterror= # none, especially not -k | | 426 | FLAGS.doterror= # none, especially not -k |
427 | FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmdline-plain' | | 427 | FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmdline-plain' |
428 | | | 428 | |
429 | # Some tests need extra postprocessing. | | 429 | # Some tests need extra postprocessing. |
430 | SED_CMDS.export= \ | | 430 | SED_CMDS.export= \ |
431 | -e '/^[^=_A-Za-z0-9]*=/d' | | 431 | -e '/^[^=_A-Za-z0-9]*=/d' |
432 | # these all share the same requirement | | 432 | # these all share the same requirement |
433 | .for t in export-all export-env | | 433 | .for t in export-all export-env |
434 | SED_CMDS.$t= ${SED_CMDS.export} | | 434 | SED_CMDS.$t= ${SED_CMDS.export} |
435 | .endfor | | 435 | .endfor |
436 | SED_CMDS.directive-export-gmake= \ | | 436 | SED_CMDS.directive-export-gmake= \ |
437 | ${:D dash is a pain } \ | | 437 | ${:D dash is a pain } \ |
438 | -e /non-zero/d | | 438 | -e /non-zero/d |
439 | SED_CMDS.job-output-long-lines= \ | | 439 | SED_CMDS.job-output-long-lines= \ |
440 | ${:D Job separators on their own line are ok. } \ | | 440 | ${:D Job separators on their own line are ok. } \ |
441 | -e '/^--- job-[ab] ---$$/d' \ | | 441 | -e '/^--- job-[ab] ---$$/d' \ |
442 | ${:D Plain output lines are ok as well. } \ | | 442 | ${:D Plain output lines are ok as well. } \ |
443 | ${:D They may come in multiples of 1024 or as 10000. } \ | | 443 | ${:D They may come in multiples of 1024 or as 10000. } \ |
444 | -e '/^aa*$$/d' \ | | 444 | -e '/^aa*$$/d' \ |
| @@ -449,31 +449,30 @@ SED_CMDS.job-output-long-lines= \ | | | @@ -449,31 +449,30 @@ SED_CMDS.job-output-long-lines= \ |
449 | -e '/^bb*--- job-a ---$$/d' | | 449 | -e '/^bb*--- job-a ---$$/d' |
450 | SED_CMDS.objdir-writable= -e 's,${RO_OBJDIR},OBJDIR/roobj,g' | | 450 | SED_CMDS.objdir-writable= -e 's,${RO_OBJDIR},OBJDIR/roobj,g' |
451 | SED_CMDS.opt-debug-graph1= \ | | 451 | SED_CMDS.opt-debug-graph1= \ |
452 | -e 's,${.CURDIR},CURDIR,' | | 452 | -e 's,${.CURDIR},CURDIR,' |
453 | SED_CMDS.opt-debug-graph1+= \ | | 453 | SED_CMDS.opt-debug-graph1+= \ |
454 | -e '/Global Variables:/,/Suffixes:/d' | | 454 | -e '/Global Variables:/,/Suffixes:/d' |
455 | SED_CMDS.sh-dots= -e 's,^.*\.\.\.:.*,<normalized: ...: not found>,' | | 455 | SED_CMDS.sh-dots= -e 's,^.*\.\.\.:.*,<normalized: ...: not found>,' |
456 | SED_CMDS.opt-debug-jobs= -e 's,([0-9][0-9]*),(<pid>),' | | 456 | SED_CMDS.opt-debug-jobs= -e 's,([0-9][0-9]*),(<pid>),' |
457 | SED_CMDS.opt-debug-jobs+= -e 's,pid [0-9][0-9]*,pid <pid>,' | | 457 | SED_CMDS.opt-debug-jobs+= -e 's,pid [0-9][0-9]*,pid <pid>,' |
458 | SED_CMDS.opt-debug-jobs+= -e 's,Process [0-9][0-9]*,Process <pid>,' | | 458 | SED_CMDS.opt-debug-jobs+= -e 's,Process [0-9][0-9]*,Process <pid>,' |
459 | SED_CMDS.opt-debug-jobs+= -e 's,JobFinish: [0-9][0-9]*,JobFinish: <pid>,' | | 459 | SED_CMDS.opt-debug-jobs+= -e 's,JobFinish: [0-9][0-9]*,JobFinish: <pid>,' |
460 | # The "-q" may be there or not, see jobs.c, variable shells. | | 460 | # The "-q" may be there or not, see jobs.c, variable shells. |
461 | SED_CMDS.opt-debug-jobs+= -e 's,^\(.Command: sh\) -q,\1,' | | 461 | SED_CMDS.opt-debug-jobs+= -e 's,^\(.Command: sh\) -q,\1,' |
462 | SED_CMDS.var-op-shell+= -e 's,^${.SHELL:T}: [ 0-9:]*,,' | | 462 | SED_CMDS.var-op-shell+= \ |
463 | SED_CMDS.var-op-shell+= -e '/command/{ s,^[1-9]: ,,;s,No such.*,not found,; }' | | 463 | -e 's,^${.SHELL:T}: [ 0-9:]*,,' \ |
464 | SED_CMDS.vardebug= \ | | 464 | -e 's,^${.SHELL:T}: ,,' \ |
465 | ${:D canonicalize .SHELL } \ | | 465 | -e '/command/s,No such.*,not found,' |
466 | -e 's,${.SHELL},/bin/sh,' | | | |
467 | SED_CMDS.vardebug+= -e 's,${.SHELL},</path/to/shell>,' | | 466 | SED_CMDS.vardebug+= -e 's,${.SHELL},</path/to/shell>,' |
468 | SED_CMDS.varmod-subst-regex+= \ | | 467 | SED_CMDS.varmod-subst-regex+= \ |
469 | -e 's,\(Regex compilation error:\).*,\1 (details omitted),' | | 468 | -e 's,\(Regex compilation error:\).*,\1 (details omitted),' |
470 | SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,' | | 469 | SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,' |
471 | SED_CMDS.varname-dot-parsedir= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' | | 470 | SED_CMDS.varname-dot-parsedir= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' |
472 | SED_CMDS.varname-dot-parsefile= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' | | 471 | SED_CMDS.varname-dot-parsefile= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' |
473 | SED_CMDS.varname-dot-shell= -e 's, = /[^ ]*, = (details omitted),g' | | 472 | SED_CMDS.varname-dot-shell= -e 's, = /[^ ]*, = (details omitted),g' |
474 | SED_CMDS.varname-dot-shell+= -e 's,"/[^" ]*","(details omitted)",g' | | 473 | SED_CMDS.varname-dot-shell+= -e 's,"/[^" ]*","(details omitted)",g' |
475 | SED_CMDS.varname-dot-shell+= -e 's,\[/[^] ]*\],[(details omitted)],g' | | 474 | SED_CMDS.varname-dot-shell+= -e 's,\[/[^] ]*\],[(details omitted)],g' |
476 | | | 475 | |
477 | # Some tests need an additional round of postprocessing. | | 476 | # Some tests need an additional round of postprocessing. |
478 | POSTPROC.deptgt-suffixes= \ | | 477 | POSTPROC.deptgt-suffixes= \ |
479 | ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p' | | 478 | ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p' |