From 93856a18194642170e6c9a727a9fef187294ac43 Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Thu, 8 Sep 2016 18:03:32 +0200 Subject: [PATCH] Added error checking to ci/build_and_test.sh Instead of executing all command even if some fail, stop when a command fails and print an error message. --- ci/build_and_test.sh | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/ci/build_and_test.sh b/ci/build_and_test.sh index accaa5eab..9f6197de8 100755 --- a/ci/build_and_test.sh +++ b/ci/build_and_test.sh @@ -2,8 +2,37 @@ # Run this script from the root source directory -./autogen.sh -make -make install -make check -make dist +if ./autogen.sh ; then + echo "autogen.sh succesfull." +else + echo "Error: autogen.sh failed." >&2 + exit 1 +fi + +if make ; then + echo "make succesfull." +else + echo "Error: make failed." >&2 + exit 1 +fi + +if make install ; then + echo "make install succesfull." +else + echo "Error: make install failed." >&2 + exit 1 +fi + +if make check ; then + echo "make check succesfull." +else + echo "Error: make check failed." >&2 + exit 1 +fi + +if make dist ; then + echo "make dist succesfull." +else + echo "Error: make dist failed." >&2 + exit 1 +fi -- 2.40.0