Only test built mempools

SVN revision: 46096
This commit is contained in:
Sebastian Dransfeld 2010-02-11 21:21:22 +00:00
parent a28ba1876e
commit e699b67248
4 changed files with 39 additions and 9 deletions

View File

@ -250,11 +250,6 @@ if test "x${enable_ememoa}" = "xyes" ; then
)
fi
AM_CONDITIONAL(EINA_ENABLE_EMEMOA, test "x${enable_ememoa}" = "xyes")
if test "x${enable_ememoa}" = "xyes"; then
AC_DEFINE(EINA_EMEMOA_SUPPORT, 1, [Use by the test suite to try ememoa mempool])
fi
### Checks for header files
AC_HEADER_ASSERT
AC_HEADER_DIRENT

View File

@ -33,6 +33,9 @@ if test "x${enable_module}" = "xstatic" ; then
have_static_module="yes"
AC_DEFINE(EINA_STATIC_BUILD_[]UP, 1, [Set to 1 if $2 is statically built])
fi
if test "x${enable_module}" != "xno" ; then
AC_DEFINE(EINA_BUILD_[]UP, 1, [Set to 1 if $2 is built])
fi
AM_CONDITIONAL(EINA_BUILD_[]UP, [test "x${have_module}" = "xyes"])
AM_CONDITIONAL(EINA_STATIC_BUILD_[]UP, [test "x${static_module}" = "xyes"])

View File

@ -54,6 +54,7 @@ _eina_mempool_bench(Eina_Mempool *mp, int request)
eina_shutdown();
}
#ifdef EINA_BUILD_CHAINED_POOL
static void
eina_mempool_chained_mempool(int request)
{
@ -63,7 +64,9 @@ eina_mempool_chained_mempool(int request)
_eina_mempool_bench(mp, request);
eina_mempool_del(mp);
}
#endif
#ifdef EINA_BUILD_PASS_THROUGH
static void
eina_mempool_pass_through(int request)
{
@ -73,7 +76,9 @@ eina_mempool_pass_through(int request)
_eina_mempool_bench(mp, request);
eina_mempool_del(mp);
}
#endif
#ifdef EINA_BUILD_FIXED_BITMAP
static void
eina_mempool_fixed_bitmap(int request)
{
@ -83,8 +88,9 @@ eina_mempool_fixed_bitmap(int request)
_eina_mempool_bench(mp, request);
eina_mempool_del(mp);
}
#endif
#ifdef EINA_EMEMOA_SUPPORT
#ifdef EINA_BUILD_EMEMOA_FIXED
static void
eina_mempool_ememoa_fixed(int request)
{
@ -94,7 +100,9 @@ eina_mempool_ememoa_fixed(int request)
_eina_mempool_bench(mp, request);
eina_mempool_del(mp);
}
#endif
#ifdef EINA_BUILD_EMEMOA_UNKNOWN
static void
eina_mempool_ememoa_unknown(int request)
{
@ -139,11 +147,19 @@ eina_mempool_glib(int request)
void
eina_bench_mempool(Eina_Benchmark *bench)
{
#ifdef EINA_BUILD_CHAINED_POOL
eina_benchmark_register(bench, "chained mempool", EINA_BENCHMARK(eina_mempool_chained_mempool), 10, 1000, 10);
#endif
#ifdef EINA_BUILD_PASS_THROUGH
eina_benchmark_register(bench, "pass through", EINA_BENCHMARK(eina_mempool_pass_through), 10, 1000, 10);
#endif
#ifdef EINA_BUILD_FIXED_BITMAP
eina_benchmark_register(bench, "fixed bitmap", EINA_BENCHMARK(eina_mempool_fixed_bitmap), 10, 1000, 10);
#ifdef EINA_EMEMOA_SUPPORT
#endif
#ifdef EINA_BUILD_EMEMOA_FIXED
eina_benchmark_register(bench, "ememoa fixed", EINA_BENCHMARK(eina_mempool_ememoa_fixed), 10, 1000, 10);
#endif
#ifdef EINA_BUILD_EMEMOA_UNKNOWN
eina_benchmark_register(bench, "ememoa unknown", EINA_BENCHMARK(eina_mempool_ememoa_unknown), 10, 1000, 10);
#endif
#ifdef EINA_BENCH_HAVE_GLIB

View File

@ -77,6 +77,7 @@ _eina_mempool_test(Eina_Mempool *mp, Eina_Bool with_realloc, Eina_Bool with_gc)
eina_mempool_del(mp);
}
#ifdef EINA_BUILD_CHAINED_POOL
START_TEST(eina_mempool_chained_mempool)
{
Eina_Mempool *mp;
@ -89,7 +90,9 @@ START_TEST(eina_mempool_chained_mempool)
_mempool_shutdown();
}
END_TEST
#endif
#ifdef EINA_BUILD_PASS_THROUGH
START_TEST(eina_mempool_pass_through)
{
Eina_Mempool *mp;
@ -102,7 +105,9 @@ START_TEST(eina_mempool_pass_through)
_mempool_shutdown();
}
END_TEST
#endif
#ifdef EINA_BUILD_FIXED_BITMAP
START_TEST(eina_mempool_fixed_bitmap)
{
Eina_Mempool *mp;
@ -115,8 +120,9 @@ START_TEST(eina_mempool_fixed_bitmap)
_mempool_shutdown();
}
END_TEST
#endif
#ifdef EINA_EMEMOA_SUPPORT
#ifdef EINA_BUILD_EMEMOA_FIXED
START_TEST(eina_mempool_ememoa_fixed)
{
Eina_Mempool *mp;
@ -129,7 +135,9 @@ START_TEST(eina_mempool_ememoa_fixed)
_mempool_shutdown();
}
END_TEST
#endif
#ifdef EINA_BUILD_EMEMOA_UNKNOWN
START_TEST(eina_mempool_ememoa_unknown)
{
Eina_Mempool *mp;
@ -147,11 +155,19 @@ END_TEST
void
eina_test_mempool(TCase *tc)
{
#ifdef EINA_BUILD_CHAINED_POOL
tcase_add_test(tc, eina_mempool_chained_mempool);
#endif
#ifdef EINA_BUILD_PASS_THROUGH
tcase_add_test(tc, eina_mempool_pass_through);
#endif
#ifdef EINA_BUILD_FIXED_BITMAP
tcase_add_test(tc, eina_mempool_fixed_bitmap);
#ifdef EINA_EMEMOA_SUPPORT
#endif
#ifdef EINA_BUILD_EMEMOA_FIXED
tcase_add_test(tc, eina_mempool_ememoa_fixed);
#endif
#ifdef EINA_BUILD_EMEMOA_UNKNOWN
tcase_add_test(tc, eina_mempool_ememoa_unknown);
#endif
}