Skip to content

Commit ba6f918

Browse files
[STYLE] Apply fixes from review
Changes in file .github/tools/checkmake.bash: * improve log handling * improve error log cleanup Changes in file Makefile: * corrected dependency order
1 parent c97da18 commit ba6f918

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/tools/checkmake.bash

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,16 @@ process_checkmake_output() {
159159
local random_id="${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM}"
160160
local chmk_elog="checkmake_${random_id}_error_log.log"
161161

162+
# Clean up on normal exit, but preserve on error for debugging
163+
trap "rm -f '${chmk_elog}' 2>/dev/null || :" EXIT ;
164+
162165
if ! output=$(checkmake "${file}" 2>"${chmk_elog}"); then
166+
# On failure, preserve log by removing trap
167+
trap - EXIT
163168
printf "%s\n" "::error title='failure'::checkmake failed!"
164-
printf "%s '%s'\n" "::error title='stderr'::checkmake error:" \
165-
$(head -n 5000 "${chmk_elog}") >&2;
169+
local error_log
170+
error_log=$(head -n 5000 "${chmk_elog}")
171+
printf "%s '%s'\n" "::error title='stderr'::checkmake error:" "$error_log" >&2
166172

167173
printf "%s\n" "${output}" | \
168174
sed -e 's/ /:/g' | \

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ user-install: ./dist
532532
$(QUIET)$(WAIT)
533533
$(QUIET)$(ECHO) "$@: Done."
534534

535-
all: build-docs docs-req test-style test-mat test-reqs build init
535+
all: init build test-reqs test-mat test-style docs-reqs build-docs
536536
$(QUIET)$(DO_FAIL) ;
537537

538538
%:

0 commit comments

Comments
 (0)