summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeif Lindholm <leif.lindholm@linaro.org>2018-08-30 21:12:04 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2018-08-30 21:12:04 +0100
commitf702d409ca697674bf7a57d122020b464aee49e6 (patch)
tree0ae75b270d5fbe2556a3427da320eadbf85714f1
parentc0ed79c3d7cde255d49afbf8a475a36db0c042f8 (diff)
edk2-build.sh: add strict build mode
New command line option --strict causes the build to fail immediately with an error return if any target for any platform fails to build. Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
-rwxr-xr-xedk2-build.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/edk2-build.sh b/edk2-build.sh
index 3e218b3..7e168b4 100755
--- a/edk2-build.sh
+++ b/edk2-build.sh
@@ -13,6 +13,7 @@ export TOOLS_DIR
PLATFORM_CONFIG="-c $TOOLS_DIR/edk2-platforms.config"
ARCH=
VERBOSE=0 # Override with -v
+STRICT=0 # Override with --strict
ATF_DIR=
TOS_DIR=
TOOLCHAIN="gcc" # Override with -T
@@ -151,6 +152,10 @@ function do_build
popd >/dev/null
fi
fi
+ if [ $STRICT -eq 1 -a $RESULT -ne 0 ]; then
+ echo "$PLATFORM_NAME:$target failed to build!"
+ exit 1
+ fi
result_log $RESULT "$PLATFORM_NAME $target"
done
unset PACKAGES_PATH
@@ -336,6 +341,9 @@ while [ "$1" != "" ]; do
shift
export TOS_DIR="`readlink -f $1`"
;;
+ --strict) # Exit if any platform/target fails to build
+ STRICT=1
+ ;;
-T) # Set specific toolchain tag, or clang/gcc for autoselection
shift
echo "Setting toolchain tag to '$1'"