add test for deb installer

This commit is contained in:
ttroy50
2015-12-14 22:39:50 +00:00
parent 840ef328fe
commit 9c07934ba7
2 changed files with 13 additions and 1 deletions

3
06-installer/deb/post_test.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
make package

11
test.sh
View File

@@ -13,6 +13,7 @@ dirs=( ./01-basic/A-hello-cmake \
./03-code-generation/configure-files \ ./03-code-generation/configure-files \
./04-static-analysis/cppcheck \ ./04-static-analysis/cppcheck \
./05-unit-testing/boost \ ./05-unit-testing/boost \
./06-installer/deb \
) )
ROOT_DIR=`pwd` ROOT_DIR=`pwd`
@@ -30,7 +31,11 @@ do
if [ -f "$dir/pre_test.sh" ]; then if [ -f "$dir/pre_test.sh" ]; then
echo "running pre test" 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 fi
cd $dir && mkdir -p build && cd build && cmake .. && make cd $dir && mkdir -p build && cd build && cmake .. && make
@@ -42,5 +47,9 @@ do
if [ -f "$ROOT_DIR/$dir/post_test.sh" ]; then if [ -f "$ROOT_DIR/$dir/post_test.sh" ]; then
echo "running post test" echo "running post test"
$ROOT_DIR/$dir/post_test.sh $ROOT_DIR/$dir/post_test.sh
if [ $? -ne 0 ]; then
echo "Error running post_test for $dir"
exit 1
fi
fi fi
done done