From 099a7daf09f5abff212aae5ca1ffb311c74b54e1 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Wed, 29 Jun 2016 16:12:57 +0200 Subject: [PATCH] Move from CUnit to BCUnit --- README.macos.md | 2 +- build/android/liblinphone_tester.mk | 2 +- .../LibLinphoneTester-native.vcxproj | 4 ++-- .../wp8/LibLinphoneTester-native/linphone-tester-native.cpp | 6 +++--- build/wp8/LibLinphoneTester-wp8/LibLinphoneTester-wp8.sln | 2 +- mediastreamer2 | 2 +- tester/liblinphone_tester.c | 6 +++--- tester/liblinphone_tester.h | 2 +- tester/tester.c | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.macos.md b/README.macos.md index 3460b14e2..b655ba141 100644 --- a/README.macos.md +++ b/README.macos.md @@ -23,7 +23,7 @@ In order to enable generation of bundle for older MacOS version, it is recommend ##### Linphone library (liblinphone) - sudo port install automake autoconf libtool pkgconfig intltool wget cunit \ + sudo port install automake autoconf libtool pkgconfig intltool wget bcunit \ antlr3 speex readline sqlite3 openldap libupnp \ ffmpeg-devel -gpl2 diff --git a/build/android/liblinphone_tester.mk b/build/android/liblinphone_tester.mk index 118aaeb88..597e412fa 100644 --- a/build/android/liblinphone_tester.mk +++ b/build/android/liblinphone_tester.mk @@ -49,7 +49,7 @@ endif LOCAL_STATIC_LIBRARIES := bctoolbox_tester -LOCAL_SHARED_LIBRARIES := cunit liblinphone +LOCAL_SHARED_LIBRARIES := bcunit liblinphone include $(BUILD_SHARED_LIBRARY) #end diff --git a/build/wp8/LibLinphoneTester-native/LibLinphoneTester-native.vcxproj b/build/wp8/LibLinphoneTester-native/LibLinphoneTester-native.vcxproj index 6bc245f9f..e60a5a6dc 100644 --- a/build/wp8/LibLinphoneTester-native/LibLinphoneTester-native.vcxproj +++ b/build/wp8/LibLinphoneTester-native/LibLinphoneTester-native.vcxproj @@ -50,7 +50,7 @@ Level4 - $(ProjectDir)..\..\..\..\belle-sip\include;$(ProjectDir)..\..\..\oRTP\include;$(ProjectDir)..\..\..\mediastreamer2\include;$(ProjectDir)..\..\..\tester;$(ProjectDir)..\..\..\coreapi;$(ProjectDir)..\..\..\include;$(ProjectDir)..\..\..\..\cunit\build\wp8\cunit\$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\include;%(AdditionalIncludeDirectories) + $(ProjectDir)..\..\..\..\belle-sip\include;$(ProjectDir)..\..\..\oRTP\include;$(ProjectDir)..\..\..\mediastreamer2\include;$(ProjectDir)..\..\..\tester;$(ProjectDir)..\..\..\coreapi;$(ProjectDir)..\..\..\include;$(ProjectDir)..\..\..\..\bcunit\build\wp8\bcunit\$(Platform)\$(Configuration);$(SolutionDir)$(Platform)\$(Configuration)\include;%(AdditionalIncludeDirectories) WIN32;_WINDOWS;_WINRT_DLL;_CRT_SECURE_NO_WARNINGS;HAVE_CU_GET_SUITE;IN_LINPHONE;%(PreprocessorDefinitions) Default NotUsing @@ -124,7 +124,7 @@ {4c225a82-800b-427b-ba7b-61686a9b347f} - + {902daf1d-ebf1-4d03-b598-143500a50ab4} diff --git a/build/wp8/LibLinphoneTester-native/linphone-tester-native.cpp b/build/wp8/LibLinphoneTester-native/linphone-tester-native.cpp index 941b50916..3c511f0fd 100644 --- a/build/wp8/LibLinphoneTester-native/linphone-tester-native.cpp +++ b/build/wp8/LibLinphoneTester-native/linphone-tester-native.cpp @@ -2,7 +2,7 @@ #include "linphone-tester-native.h" #include "ortp/logging.h" -#include "cunit/Util.h" +#include "bcunit/Util.h" using namespace linphone_tester_native; @@ -52,7 +52,7 @@ static void LinphoneNativeVerboseOutputTraceHandler(OrtpLogLevel lev, const char LinphoneNativeGenericOutputTraceHandler(lev, fmt, args); } -static void CUnitNativeOutputTraceHandler(int lev, const char *fmt, va_list args) +static void BCUnitNativeOutputTraceHandler(int lev, const char *fmt, va_list args) { nativeOutputTraceHandler(Raw, fmt, args); } @@ -87,7 +87,7 @@ void LinphoneTesterNative::run(Platform::String^ suiteName, Platform::String^ ca } else { linphone_core_enable_logs_with_cb(LinphoneNativeOutputTraceHandler); } - CU_set_trace_handler(CUnitNativeOutputTraceHandler); + CU_set_trace_handler(BCUnitNativeOutputTraceHandler); liblinphone_tester_run_tests(wssuitename == all ? 0 : csuitename, wscasename == all ? 0 : ccasename); } diff --git a/build/wp8/LibLinphoneTester-wp8/LibLinphoneTester-wp8.sln b/build/wp8/LibLinphoneTester-wp8/LibLinphoneTester-wp8.sln index cf0d4a086..42a854fb1 100644 --- a/build/wp8/LibLinphoneTester-wp8/LibLinphoneTester-wp8.sln +++ b/build/wp8/LibLinphoneTester-wp8/LibLinphoneTester-wp8.sln @@ -39,7 +39,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "speex", "..\..\..\..\speex\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "speexdsp", "..\..\..\..\speex\build\wp8\speex\speexdsp.vcxproj", "{6BD78980-9C71-4341-8775-AD19E9EC7305}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cunit", "..\..\..\..\cunit\build\wp8\cunit\cunit.vcxproj", "{902DAF1D-EBF1-4D03-B598-143500A50AB4}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bcunit", "..\..\..\..\bcunit\build\wp8\bcunit\bcunit.vcxproj", "{902DAF1D-EBF1-4D03-B598-143500A50AB4}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmswasapi", "..\..\..\..\mswasapi\mswasapi\mswasapi.vcxproj", "{D22BD217-D0F8-4274-9B3A-F3F35F46482C}" ProjectSection(ProjectDependencies) = postProject diff --git a/mediastreamer2 b/mediastreamer2 index ba0fd4218..f95252625 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit ba0fd4218dada7c6f3e923e68c756dd2d333bbcc +Subproject commit f9525262522972f598a6bb1eaad18104b0a7e712 diff --git a/tester/liblinphone_tester.c b/tester/liblinphone_tester.c index 8fc38cc53..17503ac0a 100644 --- a/tester/liblinphone_tester.c +++ b/tester/liblinphone_tester.c @@ -100,7 +100,7 @@ static void liblinphone_android_bctbx_log_handler(const char *domain, BctbxLogLe liblinphone_android_log_handler(prio, fmt, args); } -void cunit_android_trace_handler(int level, const char *fmt, va_list args) { +void bcunit_android_trace_handler(int level, const char *fmt, va_list args) { char buffer[CALLBACK_BUFFER_SIZE]; jstring javaString; jclass cls; @@ -130,7 +130,7 @@ JNIEXPORT jint JNICALL Java_org_linphone_tester_Tester_run(JNIEnv *env, jobject } current_env = env; current_obj = obj; - bc_set_trace_handler(cunit_android_trace_handler); + bc_set_trace_handler(bcunit_android_trace_handler); ret = main(argc, argv); current_env = NULL; bc_set_trace_handler(NULL); @@ -159,7 +159,7 @@ static void log_handler(int lev, const char *fmt, va_list args) { va_copy(cap,args); #ifdef ANDROID /* IMPORTANT: needed by liblinphone tester to retrieve suite list...*/ - cunit_android_trace_handler(lev == ORTP_ERROR, fmt, cap); + bcunit_android_trace_handler(lev == ORTP_ERROR, fmt, cap); #else /* Otherwise, we must use stdio to avoid log formatting (for autocompletion etc.) */ vfprintf(lev == ORTP_ERROR ? stderr : stdout, fmt, cap); diff --git a/tester/liblinphone_tester.h b/tester/liblinphone_tester.h index 9b759bb78..a1305d346 100644 --- a/tester/liblinphone_tester.h +++ b/tester/liblinphone_tester.h @@ -261,7 +261,7 @@ typedef struct _LinphoneCoreManager { LinphoneAddress* identity; LinphoneEvent *lev; bool_t decline_subscribe; - int number_of_cunit_error_at_creation; + int number_of_bcunit_error_at_creation; } LinphoneCoreManager; typedef struct _LinphoneConferenceServer { diff --git a/tester/tester.c b/tester/tester.c index 0c865fce5..69d51f4c8 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -280,7 +280,7 @@ bool_t transport_supported(LinphoneTransportType transport) { void linphone_core_manager_init(LinphoneCoreManager *mgr, const char* rc_file) { char *rc_path = NULL; char *hellopath = bc_tester_res("sounds/hello8000.wav"); - mgr->number_of_cunit_error_at_creation = bc_get_number_of_failures(); + mgr->number_of_bcunit_error_at_creation = bc_get_number_of_failures(); mgr->v_table.registration_state_changed=registration_state_changed; mgr->v_table.auth_info_requested=auth_info_requested; mgr->v_table.call_state_changed=call_state_changed; @@ -422,7 +422,7 @@ void linphone_core_manager_uninit(LinphoneCoreManager *mgr) { const char *record_file=linphone_core_get_record_file(mgr->lc); char *chatdb = ms_strdup(linphone_core_get_chat_database_path(mgr->lc)); if (!liblinphone_tester_keep_record_files && record_file){ - if ((bc_get_number_of_failures()-mgr->number_of_cunit_error_at_creation)>0) { + if ((bc_get_number_of_failures()-mgr->number_of_bcunit_error_at_creation)>0) { ms_message ("Test has failed, keeping recorded file [%s]",record_file); } else { unlink(record_file);