mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Jules Maselbas <jmaselbas@zdiv.net>,
	jre@pengutronix.de, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/6] MAKEALL: fix check_pipe_status usage
Date: Wed, 26 Mar 2025 08:59:16 +0100	[thread overview]
Message-ID: <20250326075919.3448789-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20250326075919.3448789-1-a.fatoum@pengutronix.de>

When no logdir is specified, there is no shell pipeline to check the
status of and thus check_pipe_status will not check the status of the
just run command.

Fix this by placing check_pipe_status directly after the pipelines in
question.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 MAKEALL | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index a9409fbf7b07..85b71e2e75c1 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -101,9 +101,12 @@ with_logs_collected() {
 
 	if [ -n "${logdir}" ]; then
 		"$@" 2>&1 > "${log_report}" | tee "${log_err}"
+		check_pipe_status
 	else
 		"$@"
 	fi
+
+	return $?
 }
 
 report() {
@@ -169,7 +172,6 @@ do_build_defconfig() {
 	done
 	with_logs_collected ${MAKE} $silent_flag olddefconfig
 
-	check_pipe_status
 	configure_result="$?"
 
 	report "Configure: "
@@ -178,8 +180,6 @@ do_build_defconfig() {
 		report "OK     \n"
 
 		with_logs_collected ${MAKE} $silent_flag ${TARGET}
-
-		check_pipe_status
 		compile_result="$?"
 
 		report "Compile: " ${defconfig}
@@ -230,8 +230,6 @@ do_test_defconfig() {
 	local err=0
 
 	LG_BUILDDIR=$BUILDDIR with_logs_collected pytest --lg-env $yaml "$@"
-
-	check_pipe_status
 	compile_result="$?"
 
 	report "Test: " ${yaml}
-- 
2.39.5




  parent reply	other threads:[~2025-03-26  8:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-26  7:59 [PATCH 0/6] ci: run tests and static analysis on allyesconfig Ahmad Fatoum
2025-03-26  7:59 ` [PATCH 1/6] sandbox: use CROSS_PKG_CONFIG when compiling sandbox arch code Ahmad Fatoum
2025-03-26  7:59 ` [PATCH 2/6] sandbox: hide sdl/libftdi symbols if libraries not found Ahmad Fatoum
2025-03-26  7:59 ` Ahmad Fatoum [this message]
2025-03-26  7:59 ` [PATCH 4/6] MAKEALL: remove use of alias in script Ahmad Fatoum
2025-03-26  7:59 ` [PATCH 5/6] ci: pytest: run test suite on sandbox allyesconfig Ahmad Fatoum
2025-03-26  7:59 ` [PATCH 6/6] ci: run static analysis on allyesconfig Ahmad Fatoum
2025-03-27  9:24 ` [PATCH 0/6] ci: run tests and " Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250326075919.3448789-4-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=jmaselbas@zdiv.net \
    --cc=jre@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox