Add check support
Check is a unit testing framework for C. All the QObjects have unit-tests and more will be written for the future data types. More info about check can be found at: http://check.sourceforge.net/ Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
fb46660e98
commit
5495ed11b0
31
configure
vendored
31
configure
vendored
@ -221,6 +221,7 @@ kerneldir=""
|
|||||||
aix="no"
|
aix="no"
|
||||||
blobs="yes"
|
blobs="yes"
|
||||||
pkgversion=""
|
pkgversion=""
|
||||||
|
check_utests="no"
|
||||||
|
|
||||||
# OS specific
|
# OS specific
|
||||||
if check_define __linux__ ; then
|
if check_define __linux__ ; then
|
||||||
@ -518,6 +519,10 @@ for opt do
|
|||||||
;;
|
;;
|
||||||
--enable-fdt) fdt="yes"
|
--enable-fdt) fdt="yes"
|
||||||
;;
|
;;
|
||||||
|
--disable-check-utests) check_utests="no"
|
||||||
|
;;
|
||||||
|
--enable-check-utests) check_utests="yes"
|
||||||
|
;;
|
||||||
--disable-nptl) nptl="no"
|
--disable-nptl) nptl="no"
|
||||||
;;
|
;;
|
||||||
--enable-nptl) nptl="yes"
|
--enable-nptl) nptl="yes"
|
||||||
@ -653,6 +658,8 @@ echo " --disable-curl disable curl connectivity"
|
|||||||
echo " --enable-curl enable curl connectivity"
|
echo " --enable-curl enable curl connectivity"
|
||||||
echo " --disable-fdt disable fdt device tree"
|
echo " --disable-fdt disable fdt device tree"
|
||||||
echo " --enable-fdt enable fdt device tree"
|
echo " --enable-fdt enable fdt device tree"
|
||||||
|
echo " --disable-check-utests disable check unit-tests"
|
||||||
|
echo " --enable-check-utests enable check unit-tests"
|
||||||
echo " --disable-bluez disable bluez stack connectivity"
|
echo " --disable-bluez disable bluez stack connectivity"
|
||||||
echo " --enable-bluez enable bluez stack connectivity"
|
echo " --enable-bluez enable bluez stack connectivity"
|
||||||
echo " --disable-kvm disable KVM acceleration support"
|
echo " --disable-kvm disable KVM acceleration support"
|
||||||
@ -1212,6 +1219,26 @@ EOF
|
|||||||
fi
|
fi
|
||||||
fi # test "$curl"
|
fi # test "$curl"
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# check framework probe
|
||||||
|
|
||||||
|
if test "$check_utests" != "no" ; then
|
||||||
|
cat > $TMPC << EOF
|
||||||
|
#include <check.h>
|
||||||
|
int main(void) { suite_create("qemu test"); return 0; }
|
||||||
|
EOF
|
||||||
|
check_libs=`pkg-config --libs check`
|
||||||
|
if compile_prog "" $check_libs ; then
|
||||||
|
check_utests=yes
|
||||||
|
libs_tools="$check_libs $libs_tools"
|
||||||
|
else
|
||||||
|
if test "$check_utests" = "yes" ; then
|
||||||
|
feature_not_found "check"
|
||||||
|
fi
|
||||||
|
check_utests=no
|
||||||
|
fi
|
||||||
|
fi # test "$check_utests"
|
||||||
|
|
||||||
##########################################
|
##########################################
|
||||||
# bluez support probe
|
# bluez support probe
|
||||||
if test "$bluez" != "no" ; then
|
if test "$bluez" != "no" ; then
|
||||||
@ -1661,6 +1688,7 @@ fi
|
|||||||
echo "SDL support $sdl"
|
echo "SDL support $sdl"
|
||||||
echo "curses support $curses"
|
echo "curses support $curses"
|
||||||
echo "curl support $curl"
|
echo "curl support $curl"
|
||||||
|
echo "check support $check_utests"
|
||||||
echo "mingw32 support $mingw32"
|
echo "mingw32 support $mingw32"
|
||||||
echo "Audio drivers $audio_drv_list"
|
echo "Audio drivers $audio_drv_list"
|
||||||
echo "Extra audio cards $audio_card_list"
|
echo "Extra audio cards $audio_card_list"
|
||||||
@ -1898,6 +1926,9 @@ if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
|
|||||||
tools="qemu-img\$(EXESUF) $tools"
|
tools="qemu-img\$(EXESUF) $tools"
|
||||||
if [ "$linux" = "yes" ] ; then
|
if [ "$linux" = "yes" ] ; then
|
||||||
tools="qemu-nbd\$(EXESUF) qemu-io\$(EXESUF) $tools"
|
tools="qemu-nbd\$(EXESUF) qemu-io\$(EXESUF) $tools"
|
||||||
|
if [ "$check_utests" = "yes" ]; then
|
||||||
|
tools="$tools"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
echo "TOOLS=$tools" >> $config_host_mak
|
echo "TOOLS=$tools" >> $config_host_mak
|
||||||
|
Loading…
Reference in New Issue
Block a user