Travis functional testing & minor changes

This commit is contained in:
Brendan LE GLAUNEC
2016-11-23 06:38:59 +01:00
committed by Brendan Le Glaunec
parent 2961d68200
commit fbd78301a0
22 changed files with 188 additions and 173 deletions
+42 -14
View File
@@ -5,23 +5,51 @@ COL_RESET=$ESC_SEQ"39;49;00m"
COL_RED=$ESC_SEQ"31;01m"
COL_GREEN=$ESC_SEQ"32;01m"
COL_YELLOW=$ESC_SEQ"33;01m"
COL_BLUE=$ESC_SEQ"34;01m"
COL_MAGENTA=$ESC_SEQ"35;01m"
COL_CYAN=$ESC_SEQ"36;01m"
echo -e $COL_YELLOW"Deleting old package ... "$COL_RESET
rm -f cameradar_*_Debug_Linux.tar.gz
rm -f cameradar_*_${1:-"Release"}_Linux.tar.gz
echo -e $COL_GREEN"OK!"$COL_RESET
echo -e $COL_YELLOW"Creating package ... "$COL_RESET
{
cd ..
mkdir build
cd build
rm -f cameradar_*_Debug_Linux.tar.gz
cmake .. -DCMAKE_BUILD_TYPE=Debug
make package
cp cameradar_*_Debug_Linux.tar.gz ../test
cd ../test
} &> /dev/null
cd ..
ret=$?
if [ "$ret" -ne "0" ]; then
echo -e $COL_RED"KO!"$COL_RESET;
exit 1;
fi
mkdir build
cd build
ret=$?
if [ "$ret" -ne "0" ]; then
echo -e $COL_RED"KO!"$COL_RESET;
exit 1;
fi
rm -f cameradar_*_${1:-"Release"}_Linux.tar.gz
cmake .. -DCMAKE_BUILD_TYPE=${1:-"Release"}
ret=$?
if [ "$ret" -ne "0" ]; then
echo -e $COL_RED"KO!"$COL_RESET;
exit 1;
fi
make package
ret=$?
if [ "$ret" -ne "0" ]; then
echo -e $COL_RED"KO!"$COL_RESET;
exit 1;
fi
cp cameradar_*_${1:-"Release"}_Linux.tar.gz ../test
cd ../test
ret=$?
if [ "$ret" -ne "0" ]; then
echo -e $COL_RED"KO!"$COL_RESET;
exit 1;
fi
echo -e $COL_GREEN"OK!"$COL_RESET