Move from CUnit to BCUnit

parent 1590b294
......@@ -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
......
......@@ -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
......@@ -50,7 +50,7 @@
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<AdditionalIncludeDirectories>$(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)</AdditionalIncludeDirectories>
<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)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_WINRT_DLL;_CRT_SECURE_NO_WARNINGS;HAVE_CU_GET_SUITE;IN_LINPHONE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
......@@ -124,7 +124,7 @@
<ProjectReference Include="..\..\..\..\belle-sip\build\wp8\belle-sip\belle-sip.vcxproj">
<Project>{4c225a82-800b-427b-ba7b-61686a9b347f}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\..\cunit\build\wp8\cunit\cunit.vcxproj">
<ProjectReference Include="..\..\..\..\bcunit\build\wp8\bcunit\bcunit.vcxproj">
<Project>{902daf1d-ebf1-4d03-b598-143500a50ab4}</Project>
</ProjectReference>
<ProjectReference Include="..\..\..\..\msamr\build\wp8\msamr\msamr.vcxproj">
......
......@@ -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);
}
......
......@@ -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
......
mediastreamer2 @ f9525262
Subproject commit ba0fd4218dada7c6f3e923e68c756dd2d333bbcc
Subproject commit f9525262522972f598a6bb1eaad18104b0a7e712
......@@ -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);
......
......@@ -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 {
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment