Skip to content

Commit b3940ab

Browse files
Log make -q command lines the outcome file
As a debugging help, log the `make` command line in the outcome file. This is not accurate if a command line argument contains some special characters, but good enough to help debugging. Hopefully this will only be temporary. Signed-off-by: Gilles Peskine <[email protected]>
1 parent f8f1925 commit b3940ab

File tree

1 file changed

+16
-1
lines changed
  • tests/scripts/quiet

1 file changed

+16
-1
lines changed

tests/scripts/quiet/make

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ TOOL="make"
1919
. "$(dirname "$0")/quiet.sh"
2020
EXIT_STATUS=$?
2121

22+
nl='
23+
' # set the variable to a newline
24+
2225
log_outcome () {
2326
targets=
2427
skip=
@@ -57,7 +60,19 @@ log_outcome () {
5760
else
5861
result=FAIL
5962
fi
60-
cause= # Identifying failure causes would be nice, but difficult
63+
64+
# Identifying failure causes would be nice, but difficult.
65+
# To help diagnose the tracing and our analysis of the traces in
66+
# outcome analysis, log the full make command line in the "cause"
67+
# column. Once tracing is more mature, I hope this won't be useful
68+
# any longer.
69+
cause="$*"
70+
case "$cause" in
71+
*[${nl}\\\;\"]*)
72+
# Truncate command lines containing special characters that
73+
# we don't want in the outcome file.
74+
cause=${cause%%[${nl}\\\;\"]*}...;;
75+
esac
6176

6277
for target in $targets; do
6378
case "$target" in

0 commit comments

Comments
 (0)