Files
motion/test_builds.sh
Mr-DaveDev 0e7566360f Additional Travis Tests (#499)
* Additional Travis Testing

This commit includes the following revisions to the testing.
1.  Add a output from the configure script to indicate version of libavformat.
2.  Add test_builds.sh script which includes tests for following with/without options.
    --with-developer-flags, --without-ffmpeg, --without-mysql, --without-pgsql
    --without-v4l2, --without-mysqlite3
3.  Add testing via docker for 16.04 and 17.04
2017-09-10 09:19:06 -06:00

139 lines
3.6 KiB
Bash
Executable File

#!/bin/bash
SUMMARY=""
RESULT="OK"
STARS="*****************************"
##################################################################################################
OPTION=" --with-developer-flags"
RESULT_CONFIG="Failed"
RESULT_MAKE="Failed"
printf "\n\n$STARS Testing $OPTION $STARS\n\n"
if ./configure $OPTION; then
RESULT_CONFIG="OK"
if make; then
RESULT_MAKE="OK"
else
RESULT="FAIL"
fi
else
RESULT="FAIL"
fi
SUMMARY=$SUMMARY"\n Option(s): "$OPTION" Config: "$RESULT_CONFIG" make: "$RESULT_MAKE
##################################################################################################
OPTION=" --with-developer-flags --without-ffmpeg "
RESULT_CONFIG="Failed"
RESULT_MAKE="Failed"
printf "\n\n$STARS Testing $OPTION $STARS\n\n"
if ./configure $OPTION; then
RESULT_CONFIG="OK"
if make; then
RESULT_MAKE="OK"
else
RESULT="FAIL"
fi
else
RESULT="FAIL"
fi
SUMMARY=$SUMMARY"\n Option(s): "$OPTION" Config: "$RESULT_CONFIG" make: "$RESULT_MAKE
##################################################################################################
OPTION=" --with-developer-flags --without-mysql "
RESULT_CONFIG="Failed"
RESULT_MAKE="Failed"
printf "\n\n$STARS Testing $OPTION $STARS\n\n"
if ./configure $OPTION; then
RESULT_CONFIG="OK"
if make; then
RESULT_MAKE="OK"
else
RESULT="FAIL"
fi
else
RESULT="FAIL"
fi
SUMMARY=$SUMMARY"\n Option(s): "$OPTION" Config: "$RESULT_CONFIG" make: "$RESULT_MAKE
##################################################################################################
OPTION=" --with-developer-flags --without-sqlite3 "
RESULT_CONFIG="Failed"
RESULT_MAKE="Failed"
printf "\n\n$STARS Testing $OPTION $STARS\n\n"
if ./configure $OPTION; then
RESULT_CONFIG="OK"
if make; then
RESULT_MAKE="OK"
else
RESULT="FAIL"
fi
else
RESULT="FAIL"
fi
SUMMARY=$SUMMARY"\n Option(s): "$OPTION" Config: "$RESULT_CONFIG" make: "$RESULT_MAKE
##################################################################################################
OPTION=" --with-developer-flags --without-pgsql "
RESULT_CONFIG="Failed"
RESULT_MAKE="Failed"
printf "\n\n$STARS Testing $OPTION $STARS\n\n"
if ./configure $OPTION; then
RESULT_CONFIG="OK"
if make; then
RESULT_MAKE="OK"
else
RESULT="FAIL"
fi
else
RESULT="FAIL"
fi
SUMMARY=$SUMMARY"\n Option(s): "$OPTION" Config: "$RESULT_CONFIG" make: "$RESULT_MAKE
##################################################################################################
OPTION=" --with-developer-flags --without-v4l2 "
RESULT_CONFIG="Failed"
RESULT_MAKE="Failed"
printf "\n\n$STARS Testing $OPTION $STARS\n\n"
if ./configure $OPTION; then
RESULT_CONFIG="OK"
if make; then
RESULT_MAKE="OK"
else
RESULT="FAIL"
fi
else
RESULT="FAIL"
fi
SUMMARY=$SUMMARY"\n Option(s): "$OPTION" Config: "$RESULT_CONFIG" make: "$RESULT_MAKE
##################################################################################################
OPTION=" --with-developer-flags --without-mysql --without-sqlite3 --without-pgsql "
RESULT_CONFIG="Failed"
RESULT_MAKE="Failed"
printf "\n\n$STARS Testing $OPTION $STARS\n\n"
if ./configure $OPTION; then
RESULT_CONFIG="OK"
if make; then
RESULT_MAKE="OK"
else
RESULT="FAIL"
fi
else
RESULT="FAIL"
fi
SUMMARY=$SUMMARY"\n Option(s): "$OPTION" Config: "$RESULT_CONFIG" make: "$RESULT_MAKE
##################################################################################################
printf "\n\n$STARS Test Build Results$STARS\n"
printf "$SUMMARY\n"
if test $RESULT = "FAIL"; then
printf " Test builds failed\n"
printf "\n\n$STARS$STARS\n"
exit 1
else
printf " Test builds OK\n"
printf "\n\n$STARS$STARS\n"
exit 0
fi