mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
Check for CU_get_suite presence in the configure script and disable per-suite tester when not present.
This commit is contained in:
parent
e28bd61d73
commit
bfc86a4a80
2 changed files with 12 additions and 1 deletions
|
|
@ -863,6 +863,10 @@ AM_CONDITIONAL([BUILD_CUNIT_TESTS], [test x$found_cunit = xyes && test x$tests_e
|
|||
if test "$found_cunit" = "no" ; then
|
||||
AC_MSG_WARN([Could not find cunit framework, tests are not compiled.])
|
||||
else
|
||||
AC_CHECK_LIB(cunit,CU_get_suite,[
|
||||
AC_DEFINE(HAVE_CU_GET_SUITE,1,[defined when CU_get_suite is available])
|
||||
],[foo=bar],[$CUNIT_LIBS])
|
||||
|
||||
AC_CHECK_LIB(cunit,CU_curses_run_tests,[
|
||||
AC_DEFINE(HAVE_CU_CURSES,1,[defined when CU_curses_run_tests is available])
|
||||
],[foo=bar],[$CUNIT_LIBS])
|
||||
|
|
|
|||
|
|
@ -387,6 +387,11 @@ int liblinphone_tester_run_tests(const char *suite_name, const char *test_name)
|
|||
run_test_suite(test_suite[i]);
|
||||
}
|
||||
|
||||
#if !HAVE_CU_GET_SUITE
|
||||
if( suite_name ){
|
||||
ms_warning("Tester compiled without CU_get_suite() function, running all tests instead of suite '%s'\n", suite_name);
|
||||
}
|
||||
#else
|
||||
if (suite_name){
|
||||
CU_pSuite suite;
|
||||
CU_basic_set_mode(CU_BRM_VERBOSE);
|
||||
|
|
@ -409,7 +414,9 @@ int liblinphone_tester_run_tests(const char *suite_name, const char *test_name)
|
|||
} else {
|
||||
CU_basic_run_suite(suite);
|
||||
}
|
||||
} else
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#if HAVE_CU_CURSES
|
||||
if (curses) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue