]> granicus.if.org Git - graphviz/commitdiff
Added error checking to ci/build_and_test.sh
authorErwin Janssen <erwinjanssen@outlook.com>
Thu, 8 Sep 2016 16:03:32 +0000 (18:03 +0200)
committerErwin Janssen <erwinjanssen@outlook.com>
Thu, 8 Sep 2016 18:53:38 +0000 (20:53 +0200)
Instead of executing all command even if some fail, stop when a command fails and print an error message.

ci/build_and_test.sh

index accaa5eabeb611c3cbd82f1009228270d6fe2cb8..9f6197de848181ac5e08db1f555bd8aab4726968 100755 (executable)
@@ -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