Commit 283b0352 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

tester: do not reference cunit anymore, use bctoolbox instead

parent cc856557
...@@ -20,9 +20,6 @@ ...@@ -20,9 +20,6 @@
#include "linphonecore.h" #include "linphonecore.h"
#include "private.h" #include "private.h"
#include "liblinphone_tester.h" #include "liblinphone_tester.h"
#if HAVE_CU_CURSES
#include "CUnit/CUCurses.h"
#endif
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) #if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic push #pragma GCC diagnostic push
...@@ -44,7 +41,6 @@ static FILE * log_file = NULL; ...@@ -44,7 +41,6 @@ static FILE * log_file = NULL;
#include <android/log.h> #include <android/log.h>
#include <jni.h> #include <jni.h>
#include <CUnit/Util.h>
#define CALLBACK_BUFFER_SIZE 1024 #define CALLBACK_BUFFER_SIZE 1024
static JNIEnv *current_env = NULL; static JNIEnv *current_env = NULL;
...@@ -113,10 +109,10 @@ JNIEXPORT jint JNICALL Java_org_linphone_tester_Tester_run(JNIEnv *env, jobject ...@@ -113,10 +109,10 @@ JNIEXPORT jint JNICALL Java_org_linphone_tester_Tester_run(JNIEnv *env, jobject
} }
current_env = env; current_env = env;
current_obj = obj; current_obj = obj;
CU_set_trace_handler(cunit_android_trace_handler); bc_set_trace_handler(cunit_android_trace_handler);
ret = main(argc, argv); ret = main(argc, argv);
current_env = NULL; current_env = NULL;
CU_set_trace_handler(NULL); bc_set_trace_handler(NULL);
for (i=0; i<argc; i++) { for (i=0; i<argc; i++) {
free(argv[i]); free(argv[i]);
} }
......
...@@ -20,17 +20,13 @@ ...@@ -20,17 +20,13 @@
#include "linphonecore.h" #include "linphonecore.h"
#include "private.h" #include "private.h"
#include "liblinphone_tester.h" #include "liblinphone_tester.h"
#include <bctoolbox/tester.h>
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4) #if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic push #pragma GCC diagnostic push
#endif #endif
#pragma GCC diagnostic ignored "-Wstrict-prototypes" #pragma GCC diagnostic ignored "-Wstrict-prototypes"
#include "CUnit/TestRun.h"
#include "CUnit/Automated.h"
#if HAVE_CU_CURSES
#include "CUnit/CUCurses.h"
#endif
#ifdef HAVE_GTK #ifdef HAVE_GTK
#include <gtk/gtk.h> #include <gtk/gtk.h>
#endif #endif
...@@ -270,7 +266,7 @@ bool_t transport_supported(LinphoneTransportType transport) { ...@@ -270,7 +266,7 @@ bool_t transport_supported(LinphoneTransportType transport) {
void linphone_core_manager_init(LinphoneCoreManager *mgr, const char* rc_file) { void linphone_core_manager_init(LinphoneCoreManager *mgr, const char* rc_file) {
char *rc_path = NULL; char *rc_path = NULL;
char *hellopath = bc_tester_res("sounds/hello8000.wav"); char *hellopath = bc_tester_res("sounds/hello8000.wav");
mgr->number_of_cunit_error_at_creation = CU_get_number_of_failures(); mgr->number_of_cunit_error_at_creation = bc_get_number_of_failures();
mgr->v_table.registration_state_changed=registration_state_changed; mgr->v_table.registration_state_changed=registration_state_changed;
mgr->v_table.auth_info_requested=auth_info_requested; mgr->v_table.auth_info_requested=auth_info_requested;
mgr->v_table.call_state_changed=call_state_changed; mgr->v_table.call_state_changed=call_state_changed;
...@@ -410,7 +406,7 @@ void linphone_core_manager_uninit(LinphoneCoreManager *mgr) { ...@@ -410,7 +406,7 @@ void linphone_core_manager_uninit(LinphoneCoreManager *mgr) {
int unterminated_calls; int unterminated_calls;
if (!liblinphone_tester_keep_record_files && record_file){ if (!liblinphone_tester_keep_record_files && record_file){
if ((CU_get_number_of_failures()-mgr->number_of_cunit_error_at_creation)>0) { if ((bc_get_number_of_failures()-mgr->number_of_cunit_error_at_creation)>0) {
ms_message ("Test has failed, keeping recorded file [%s]",record_file); ms_message ("Test has failed, keeping recorded file [%s]",record_file);
} else { } else {
unlink(record_file); 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