diff options
author | Sasha Levin <sashal@kernel.org> | 2025-07-01 23:04:26 -0400 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2025-07-01 23:04:26 -0400 |
commit | c9517c59d707f0cbd98bddc34a326f760b68db8a (patch) | |
tree | 327b5cecb1235c49af9516f5d0f2aaf6f7a88bd1 | |
parent | 8aa9d4365a83bb958b309a499ba2112c9e7517b6 (diff) | |
download | stable-queue-c9517c59d707f0cbd98bddc34a326f760b68db8a.tar.gz |
mailbot: get build results via stdout output
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rwxr-xr-x | scripts/mailbot.sh | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/scripts/mailbot.sh b/scripts/mailbot.sh index 2ca3a71a8f2..6c1b34e14f8 100755 --- a/scripts/mailbot.sh +++ b/scripts/mailbot.sh @@ -862,15 +862,18 @@ test_commit_on_branch() { fi # Run build test - if ! stable build; then - if [ -f ~/errors-linus-next ]; then - local build_error=$(cat ~/errors-linus-next) - results+=("stable/linux-${version}.y | Success | Failed") + local build_output + build_output=$(stable build log 2>&1) + local build_ret=$? + + if [ $build_ret -ne 0 ]; then + results+=("stable/linux-${version}.y | Success | Failed") + if [ -n "$build_output" ]; then errors+=("Build error for ${branch}:") - errors+=("$(echo "$build_error" | sed 's/^/ /')") + errors+=("$(echo "$build_output" | sed 's/^/ /')") errors+=("") else - results+=("stable/linux-${version}.y | Success | Failed (no log)") + errors+=("Build error for ${branch}: (no output captured)") fi result=1 else @@ -1083,15 +1086,18 @@ Commit author: $commit_author" failed=1 else # Run build test - if ! stable build; then - if [ -f ~/errors-linus-next ]; then - local build_error=$(cat ~/errors-linus-next) - p_results+=("$full_branch_name | Success | Failed") + local build_output + build_output=$(stable build log 2>&1) + local build_ret=$? + + if [ $build_ret -ne 0 ]; then + p_results+=("$full_branch_name | Success | Failed") + if [ -n "$build_output" ]; then p_errors+=("Build error:") - p_errors+=("$(echo "$build_error" | sed 's/^/ /')") + p_errors+=("$(echo "$build_output" | sed 's/^/ /')") p_errors+=("") else - p_results+=("$full_branch_name | Success | Failed (no log)") + p_errors+=("Build error: (no output captured)") fi failed=1 else |