[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 25/29] Add check support
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 25/29] Add check support |
Date: |
Fri, 28 Aug 2009 15:27:28 -0300 |
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 <address@hidden>
---
configure | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index b805f10..92d29c9 100755
--- a/configure
+++ b/configure
@@ -221,6 +221,7 @@ kerneldir=""
aix="no"
blobs="yes"
pkgversion=""
+check_utests="no"
# OS specific
if check_define __linux__ ; then
@@ -518,6 +519,10 @@ for opt do
;;
--enable-fdt) fdt="yes"
;;
+ --disable-check-utests) check_utests="no"
+ ;;
+ --enable-check-utests) check_utests="yes"
+ ;;
--disable-nptl) nptl="no"
;;
--enable-nptl) nptl="yes"
@@ -653,6 +658,8 @@ echo " --disable-curl disable curl connectivity"
echo " --enable-curl enable curl connectivity"
echo " --disable-fdt disable 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 " --enable-bluez enable bluez stack connectivity"
echo " --disable-kvm disable KVM acceleration support"
@@ -1213,6 +1220,26 @@ EOF
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
if test "$bluez" != "no" ; then
cat > $TMPC << EOF
@@ -1661,6 +1688,7 @@ fi
echo "SDL support $sdl"
echo "curses support $curses"
echo "curl support $curl"
+echo "check support $check_utests"
echo "mingw32 support $mingw32"
echo "Audio drivers $audio_drv_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"
if [ "$linux" = "yes" ] ; then
tools="qemu-nbd\$(EXESUF) qemu-io\$(EXESUF) $tools"
+ if [ "$check_utests" = "yes" ]; then
+ tools="$tools"
+ fi
fi
fi
echo "TOOLS=$tools" >> $config_host_mak
--
1.6.4.1.184.g2e117
- [Qemu-devel] [PATCH 15/29] monitor: Port handler_6 to use QDict, (continued)
- [Qemu-devel] [PATCH 15/29] monitor: Port handler_6 to use QDict, Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 16/29] monitor: Port handler_7 to use QDict, Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 17/29] monitor: Drop handler_8 and handler_9, Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 18/29] monitor: Port handler_10 to use QDict, Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 19/29] monitor: Split monitor_handle_command(), Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 20/29] monitor: Drop unused macros, Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 21/29] monitor: Drop str_allocated[], Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 22/29] monitor: Drop args[] handling code, Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 23/29] monitor: fail when 'i' type is greater than 32-bit, Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 24/29] monitor: Update supported types documentation, Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 25/29] Add check support,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 26/29] Introduce QInt unit-tests, Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 27/29] Introduce QString unit-tests, Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 28/29] Introduce QDict test data file, Luiz Capitulino, 2009/08/28
- [Qemu-devel] [PATCH 29/29] Introduce QDict unit-tests, Luiz Capitulino, 2009/08/28