Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
283b0352
Commit
283b0352
authored
Mar 02, 2016
by
Gautier Pelloux-Prayer
Browse files
tester: do not reference cunit anymore, use bctoolbox instead
parent
cc856557
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
14 deletions
+6
-14
tester/liblinphone_tester.c
tester/liblinphone_tester.c
+2
-6
tester/tester.c
tester/tester.c
+4
-8
No files found.
tester/liblinphone_tester.c
View file @
283b0352
...
...
@@ -20,9 +20,6 @@
#include "linphonecore.h"
#include "private.h"
#include "liblinphone_tester.h"
#if HAVE_CU_CURSES
#include "CUnit/CUCurses.h"
#endif
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic push
...
...
@@ -44,7 +41,6 @@ static FILE * log_file = NULL;
#include <android/log.h>
#include <jni.h>
#include <CUnit/Util.h>
#define CALLBACK_BUFFER_SIZE 1024
static
JNIEnv
*
current_env
=
NULL
;
...
...
@@ -113,10 +109,10 @@ JNIEXPORT jint JNICALL Java_org_linphone_tester_Tester_run(JNIEnv *env, jobject
}
current_env
=
env
;
current_obj
=
obj
;
CU
_set_trace_handler
(
cunit_android_trace_handler
);
bc
_set_trace_handler
(
cunit_android_trace_handler
);
ret
=
main
(
argc
,
argv
);
current_env
=
NULL
;
CU
_set_trace_handler
(
NULL
);
bc
_set_trace_handler
(
NULL
);
for
(
i
=
0
;
i
<
argc
;
i
++
)
{
free
(
argv
[
i
]);
}
...
...
tester/tester.c
View file @
283b0352
...
...
@@ -20,17 +20,13 @@
#include "linphonecore.h"
#include "private.h"
#include "liblinphone_tester.h"
#include <bctoolbox/tester.h>
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic push
#endif
#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
#include <gtk/gtk.h>
#endif
...
...
@@ -270,7 +266,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
=
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
.
auth_info_requested
=
auth_info_requested
;
mgr
->
v_table
.
call_state_changed
=
call_state_changed
;
...
...
@@ -410,7 +406,7 @@ void linphone_core_manager_uninit(LinphoneCoreManager *mgr) {
int
unterminated_calls
;
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
);
}
else
{
unlink
(
record_file
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment