1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 13:29:16 +02:00
openwrt/.github/workflows/scripts/show_build_failures.sh
Petr Štetiar f9653cbaac ci: show_build_failures: fix missing output for configure failures
We're currently missing log output in cases where `configure` fails
which returns 77 as its error code:

 make[3]: *** [Makefile:118: elfutils-0.188/.configured_889556d2f423f99e091beece9c8d870a] Error 77

So lets adjust the regexps so they can handle multiple digits.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-01-09 11:22:10 +01:00

16 lines
426 B
Bash
Executable File

#!/bin/bash
original_exit_code="${ret:-1}"
log_dir_path="${1:-logs}"
context="${2:-10}"
show_make_build_errors() {
grep -slr 'make\[[[:digit:]]\+\].*Error [[:digit:]]\+$' "$log_dir_path" | while IFS= read -r log_file; do
printf "====== Make errors from %s ======\n" "$log_file";
grep -r -C"$context" 'make\[[[:digit:]]\+\].*Error [[:digit:]]\+$' "$log_file" ;
done
}
show_make_build_errors
exit "$original_exit_code"