From 9c07934ba7391f20b2e6f8e423ba286a143b4616 Mon Sep 17 00:00:00 2001 From: ttroy50 Date: Mon, 14 Dec 2015 22:39:50 +0000 Subject: [PATCH] add test for deb installer --- 06-installer/deb/post_test.sh | 3 +++ test.sh | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 06-installer/deb/post_test.sh diff --git a/06-installer/deb/post_test.sh b/06-installer/deb/post_test.sh new file mode 100755 index 0000000..7375673 --- /dev/null +++ b/06-installer/deb/post_test.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +make package diff --git a/test.sh b/test.sh index 43ece34..bf3bc4b 100755 --- a/test.sh +++ b/test.sh @@ -13,6 +13,7 @@ dirs=( ./01-basic/A-hello-cmake \ ./03-code-generation/configure-files \ ./04-static-analysis/cppcheck \ ./05-unit-testing/boost \ +./06-installer/deb \ ) ROOT_DIR=`pwd` @@ -30,7 +31,11 @@ do if [ -f "$dir/pre_test.sh" ]; then echo "running pre test" - $dir/pre_test.sh + $ROOT_DIR/$dir/pre_test.sh + if [ $? -ne 0 ]; then + echo "Error running pre_test for $dir" + exit 1 + fi fi cd $dir && mkdir -p build && cd build && cmake .. && make @@ -42,5 +47,9 @@ do if [ -f "$ROOT_DIR/$dir/post_test.sh" ]; then echo "running post test" $ROOT_DIR/$dir/post_test.sh + if [ $? -ne 0 ]; then + echo "Error running post_test for $dir" + exit 1 + fi fi done