diff options
| author | rillig <rillig@NetBSD.org> | 2021-04-27 16:20:06 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2021-04-27 16:20:06 +0000 |
| commit | b756cc91c8a5bfcb72d49b3ee1bd0702843f7df8 (patch) | |
| tree | 3bb5ad621f7bf28bc3e073f4a260410a7664ef8f /usr.bin/make/unit-tests/opt-debug-errors-jobs.mk | |
| parent | 09d76c9e4a9d37e690bfd4404daeda66fbe7879a (diff) | |
tests/make: test the combination of -de with -j1
The test cases are the same as in opt-debug-errors.mk. The output
differs in several details though.
Even though the option '-k' is given (which is the default for any tests
that don't override it in unit-tests/Makefile), there is no message
"(continuing)" anywhere.
The failed target is printed twice. Once before the failed commands,
once after. This redundancy is not necessary and may be removed in a
follow-up commit.
The printed commands are in their unexpanded form, which may or may not
be more helpful than the expanded and space-normalized form of compat
mode. Either way, this is an unnecessary inconsistency between compat
mode and jobs mode.
In jobs mode, the message "make: stopped in $dir" is printed for each
failure, which is helpful since each of the jobs may have started in a
separate directory.
Diffstat (limited to 'usr.bin/make/unit-tests/opt-debug-errors-jobs.mk')
| -rw-r--r-- | usr.bin/make/unit-tests/opt-debug-errors-jobs.mk | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/usr.bin/make/unit-tests/opt-debug-errors-jobs.mk b/usr.bin/make/unit-tests/opt-debug-errors-jobs.mk new file mode 100644 index 00000000000..83b50987a75 --- /dev/null +++ b/usr.bin/make/unit-tests/opt-debug-errors-jobs.mk @@ -0,0 +1,36 @@ +# $NetBSD: opt-debug-errors-jobs.mk,v 1.1 2021/04/27 16:20:06 rillig Exp $ +# +# Tests for the -de command line option, which adds debug logging for +# failed commands and targets; since 2021-04-27 also in jobs mode. + +.MAKEFLAGS: -de -j1 + +all: fail-spaces +all: fail-escaped-space +all: fail-newline +all: fail-multiline +all: fail-multiline-intention + +fail-spaces: + echo '3 spaces'; false + +fail-escaped-space: + echo \ indented; false + +fail-newline: + echo 'line1${.newline}line2'; false + +# The line continuations in multiline commands are turned into an ordinary +# space before the command is actually run. +fail-multiline: + echo 'line1\ + line2'; false + +# It is a common style to align the continuation backslashes at the right +# of the lines, usually at column 73. All spaces before the continuation +# backslash are preserved and are usually outside a shell word and thus +# irrelevant. Since "usually" is not "always", these space characters are +# not merged into a single space. +fail-multiline-intention: + echo 'word1' \ + 'word2'; false |
