DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] scripts: print failed directory when testing build
Date: Fri, 15 Jul 2016 15:55:03 +0200	[thread overview]
Message-ID: <1468590903-16363-1-git-send-email-thomas.monjalon@6wind.com> (raw)

The script test-build.sh can be used to test building several
targets with different configurations. The directory name reflects
the target and the customized configuration.
When there is a failure, it is convenient to print this build
directory to quickly know which case is failing without scrolling
the build log history.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 scripts/test-build.sh | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/scripts/test-build.sh b/scripts/test-build.sh
index 30dfdf5..d2cafc1 100755
--- a/scripts/test-build.sh
+++ b/scripts/test-build.sh
@@ -96,12 +96,13 @@ configs=${*:-$DPDK_BUILD_TEST_CONFIGS}
 success=false
 on_exit ()
 {
-	if [ "$DPDK_NOTIFY" = notify-send ] ; then
-		if $success ; then
+	if $success ; then
+		[ "$DPDK_NOTIFY" != notify-send ] || \
 			notify-send -u low --icon=dialog-information 'DPDK build' 'finished'
-		elif [ -z "$signal" ] ; then
+	elif [ -z "$signal" ] ; then
+		[ -z "$dir" ] || echo "failed to build $dir" >&2
+		[ "$DPDK_NOTIFY" != notify-send ] || \
 			notify-send -u low --icon=dialog-error 'DPDK build' 'failed'
-		fi
 	fi
 }
 # catch manual interrupt to ignore notification
@@ -232,6 +233,7 @@ for conf in $configs ; do
 		O=$(readlink -m $dir/examples/performance-thread)
 	unset RTE_TARGET
 	echo "################## $dir done."
+	unset dir
 done
 
 if ! $short ; then
-- 
2.7.0

             reply	other threads:[~2016-07-15 13:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15 13:55 Thomas Monjalon [this message]
2016-07-15 15:19 ` Thomas Monjalon

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=1468590903-16363-1-git-send-email-thomas.monjalon@6wind.com \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    /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;
as well as URLs for NNTP newsgroup(s).