/
githubmirror
/
libfastjson
Обзор
Документация
Войти
/
githubmirror
/
libfastjson
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
devtools/gather-check-logs.sh
45 строк
955 B
Rainer Gerhards
ci: replace Travis with GitHub Actions
23 июл 2026, 10:42
23 июл 2026, 10:42
1885753
Код
Авторство
О чём код?
#!/bin/bash # Gather logs generated by make check or make distcheck. set -e show_log() { if grep -q ":test-result: FAIL" "$1"; then printf '\nFAIL: %s\n\n' "${1%%.trs}" logfile="${1%%trs}log" if [ -f "$logfile" ]; then lines=$(wc -l < "$logfile") if ((lines > 4000)); then ls -l "$logfile" printf 'file is very large (%d lines), showing parts\n' "$lines" head -n 2000 "$logfile" printf '\n\n... snip ...\n\n' tail -n 2000 "$logfile" else cat "$logfile" fi else printf 'log file missing\n' fi fi } append_summary() { printf 'file: %s\n' "$1" head -n 12 "$1" } export -f show_log export -f append_summary printf 'find failing tests\n' rm -f failed-tests.log find . -name '*.trs' -exec bash -c 'show_log "$1" >> failed-tests.log' _ {} \; if [ -s failed-tests.log ]; then find . -name test-suite.log \ -exec bash -c 'append_summary "$1" >> failed-tests.log' _ {} \; else rm -f failed-tests.log fi