Commit 0e22f1b6 authored by Gautier Pelloux-Prayer's avatar Gautier Pelloux-Prayer
Browse files

Fix Android liblinphone_tester compilation

parent 49e10b2e
......@@ -2129,7 +2129,7 @@ static void call_with_file_player(void) {
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallEnd,1));
/*cannot run on iphone simulator because locks main loop beyond permitted time (should run
on another thread) */
#if !defined(__arm__) && !defined(__arm64__) && !TARGET_IPHONE_SIMULATOR
#if !defined(__arm__) && !defined(__arm64__) && !TARGET_IPHONE_SIMULATOR && !defined(ANDROID)
{
double similar;
const double threshold = 0.9;
......@@ -2205,7 +2205,7 @@ static void call_with_mkv_file_player(void) {
linphone_core_terminate_all_calls(marie->lc);
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallEnd,1));
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallEnd,1));
#ifndef __arm__
#if !defined(__arm__) && !defined(__arm64__) && !TARGET_IPHONE_SIMULATOR && !defined(ANDROID)
CU_ASSERT_TRUE(ms_audio_diff(hellowav,recordpath,&similar,NULL,NULL)==0);
CU_ASSERT_TRUE(similar>threshold);
CU_ASSERT_TRUE(similar<=1.0);
......
......@@ -41,6 +41,8 @@ static JNIEnv *current_env = NULL;
static jobject current_obj = 0;
static const char* LogDomain = "liblinphone_tester";
int main(int argc, char** argv);
void linphone_android_log_handler(int prio, const char *fmt, va_list args) {
char str[4096];
char *current;
......
......@@ -614,7 +614,7 @@ int liblinphone_tester_fprintf(FILE * stream, const char * format, ...) {
#else
/*used by liblinphone tester to retrieve suite list*/
result = 0;
cunit_android_trace_handler(stream, format, args);
cunit_android_trace_handler(stream == stderr, format, args);
#endif
va_end(args);
return result;
......
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