Enlightenment CVS committal
Author : cedric
Project : e17
Module : libs/eet
Dir : e17/libs/eet
Modified Files:
ChangeLog INSTALL Makefile.am configure.in
Log Message:
Introducing unit test in EFL using cvs check library for the test
suite (http://check.sourceforge.net/) and lcov from cvs also for the
coverage accounting (http://ltp.sourceforge.net/coverage/lcov.php).
This first set provide an overall coverage rate for src/lib 2111
of 2607 lines (81.0%) for eet. And it helped in finding and fixing
the bugs of the last three days.
===================================================================
RCS file: /cvs/e/e17/libs/eet/ChangeLog,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ChangeLog 28 Apr 2008 03:04:26 -0000 1.4
+++ ChangeLog 16 May 2008 15:07:03 -0000 1.5
@@ -8,4 +8,37 @@
(IS_SIMPLE_TYPE) to alloc the correct amount (using the correct type
offset). Also fixed a hash (EET_G_HASH) of simple types too.
+2008-05-14 Cedric BAIL
+ * Fix convertion from a text to a hash (EET_G_HASH).
+
+ * Fix inlined string (EET_T_INLINED_STRING) dump/undump by introducing
+ the new word for the parser 'inlined'.
+
+2008-05-15 Cedric BAIL
+
+ * Fix a typo preventing the parsing of unsigned int (EET_T_UINT).
+
+ * Fix group of simple type by implicitly creating a structure with
+ the simple type in it.
+
+ * Remove dead code handling group of simple type and put assert
+ instead.
+
+2008-05-16 Cedric BAIL
+
+ * Fix eet_data_descriptor3_new as it purpose was to introduce
+ str_direct_alloc/str_direct_free usage. Application should now receive
+ direct pointer to read only (mmaped) string.
+
+ * Fix EET_FILE_MODE_READ_WRITE when file doesn't exist.
+
+ * Fix some miss use of efn->offset.
+
+ * Introduce unit test in EFL. The current set provide an overall
+ coverage rate of 2111 of 2607 lines (81.0%) for eet. It helped
+ finding and fixing the bugs of the last three days.
+ The test suite is based on library check. At this time we need
+ cvs version, look at http://check.sourceforge.net/ to find it.
+ The covering is done by lcov and we also need the cvs version that
+ you can found at http://ltp.sourceforge.net/coverage/lcov.php.
===================================================================
RCS file: /cvs/e/e17/libs/eet/INSTALL,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- INSTALL 8 Mar 2008 07:28:12 -0000 1.4
+++ INSTALL 16 May 2008 15:07:03 -0000 1.5
@@ -39,3 +39,11 @@
3) run configure with the option
--host=arm-wince-cegcc
+
+NOTE: If you want to be able to run make check, you need library check
+ from http://check.sourceforge.net/.
+
+NOTE: If you want to be able to run coverage test over eet, you will need
+ lcov from http://ltp.sourceforge.net/coverage/lcov.php.
+
+NOTE: For coverage support you also need check support.
===================================================================
RCS file: /cvs/e/e17/libs/eet/Makefile.am,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- Makefile.am 20 Apr 2008 06:03:03 -0000 1.37
+++ Makefile.am 16 May 2008 15:07:03 -0000 1.38
@@ -38,3 +38,49 @@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = eet.pc
+
+
+if EET_ENABLE_TESTS
+
+check-local:
+ @./src/tests/eet_suite
+
+else
+
+check-local:
+ @echo "reconfigure with --enable-tests"
+
+endif
+
+if EET_ENABLE_COVERAGE
+lcov-reset:
+ @rm -rf coverage
+ @find . -name "*.gcda" -exec rm {} \;
+ @lcov --directory . --zerocounters
+
+lcov-report:
+ @mkdir coverage
+ @lcov --compat-libtool --directory . --capture --output-file
coverage/coverage.info
+ @lcov -l coverage/coverage.info | grep -v "`cd $(top_srcdir) && pwd`" |
cut -d: -f1 > coverage/remove
+ @lcov -r coverage/coverage.info `cat coverage/remove` >
coverage/coverage.cleaned.info
+ @rm coverage/remove
+ @mv coverage/coverage.cleaned.info coverage/coverage.info
+ @genhtml -t "$(PACKAGE_STRING)" -o coverage coverage/coverage.info
+
+coverage:
+ @make lcov-reset
+ @make check
+ @make lcov-report
+
+clean-local:
+ @rm -rf coverage
+else
+lcov-reset:
+ @echo "reconfigure with --enable-gcov"
+
+lcov-report:
+ @echo "reconfigure with --enable-gcov"
+
+coverage:
+ @echo "reconfigure with --enable-tests --enable-gcov"
+endif
===================================================================
RCS file: /cvs/e/e17/libs/eet/configure.in,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -3 -r1.95 -r1.96
--- configure.in 20 Apr 2008 06:40:28 -0000 1.95
+++ configure.in 16 May 2008 15:07:03 -0000 1.96
@@ -29,6 +29,8 @@
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
AC_SUBST(version_info)
+PKG_PROG_PKG_CONFIG
+
WIN32_CFLAGS=""
WIN32_LIBS=""
lt_no_undefined=""
@@ -115,6 +117,73 @@
], AC_MSG_WARN([Cannot check when cross-compiling -- assuming null is okay])
)
+dnl Unit Tests
+
+AC_ARG_ENABLE(tests,
+ [AC_HELP_STRING([--enable-tests], [Enable tests @<:@default=no@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ enable_tests="yes"
+ else
+ enable_tests="no"
+ fi
+ ],
+ [enable_tests="no"]
+)
+AC_MSG_CHECKING([if tests are built])
+AC_MSG_RESULT([${enable_tests}])
+
+if test "x${enable_tests}" = "xyes" ; then
+ PKG_CHECK_MODULES([CHECK],
+ [check >= 0.9.5],
+ [dummy="yes"],
+ [enable_tests="no"]
+ )
+fi
+
+AM_CONDITIONAL(EET_ENABLE_TESTS, test "x${enable_tests}" = "xyes")
+
+dnl Coverage
+
+AC_ARG_ENABLE(coverage,
+ [AC_HELP_STRING([--enable-coverage],
+ [compile with coverage profiling instrumentation @<:@default=no@:>@])],
+ [
+ if test "x${enableval}" = "xyes" ; then
+ enable_coverage="yes"
+ else
+ enable_coverage="no"
+ fi],
+ [enable_coverage="no"]
+)
+AC_MSG_CHECKING([whether to use profiling instrumentation])
+AC_MSG_RESULT($enable_coverage)
+
+if test "x$enable_tests" = "xno" -a "x$enable_coverage" = "xyes"; then
+ enable_coverage="no"
+fi
+
+if test "x$enable_coverage" = "xyes"; then
+ AC_CHECK_PROG(have_lcov,
+ [lcov],
+ [yes],
+ [no]
+ )
+ if test "x$have_lcov" = "xyes" ; then
+ COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
+ COVERAGE_LIBS="-lgcov"
+dnl remove any optimisation flag and force debug symbols
+ CFLAGS="-g -O0"
+ else
+ AC_MSG_WARN([lcov is not found, disable profiling instrumentation])
+ enable_coverage="no"
+ fi
+fi
+AC_SUBST(COVERAGE_CFLAGS)
+AC_SUBST(COVERAGE_LIBS)
+
+AM_CONDITIONAL(EET_ENABLE_COVERAGE, test "x$enable_coverage" = "xyes")
+
#AM_CHECK_DOXYGEN()
AC_OUTPUT([
@@ -124,6 +193,7 @@
src/Makefile
src/lib/Makefile
src/bin/Makefile
+src/tests/Makefile
README
eet.spec
])
@@ -140,6 +210,9 @@
echo "------------------------------------------------------------------------"
echo
echo "Configuration Options Summary:"
+echo
+echo " Tests................: ${enable_tests}"
+echo " Coverage.............: ${enable_coverage}"
echo
echo " Compilation..........: make"
echo
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs