From: Thomas Monjalon Date: Fri, 15 Jul 2016 13:49:57 +0000 (+0200) Subject: scripts: print failed directory when testing build X-Git-Tag: spdx-start~6177 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=72551a5feea56a8bb08bda53137a9026c0f39c4e;p=dpdk.git scripts: print failed directory when testing build 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 --- diff --git a/scripts/test-build.sh b/scripts/test-build.sh index 5bcecfc37e..52c89cf701 100755 --- a/scripts/test-build.sh +++ b/scripts/test-build.sh @@ -95,12 +95,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 @@ -231,6 +232,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