Remove dependency on objc compiler, and let the final application in iOS use the liblinphonetester.a library to implement unit tests

This commit is contained in:
Guillaume BIENKOWSKI 2014-03-04 16:00:41 +01:00
parent 042729508a
commit eef680c350
4 changed files with 1 additions and 79 deletions

View file

@ -39,7 +39,6 @@ AC_CONFIG_MACRO_DIR([m4])
dnl don't put anythingelse before AC_PROG_CC unless checking if macro still work for clang
AC_PROG_CXX(["xcrun clang++" g++])
AC_PROG_CC(["xcrun clang" gcc])
AC_PROG_OBJC(["xcrun clang" gcc])
gl_LD_OUTPUT_DEF

View file

@ -26,14 +26,7 @@ liblinphonetester_la_SOURCES = tester.c \
AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/coreapi
AM_CFLAGS = $(STRICT_OPTIONS) -DIN_LINPHONE $(ORTP_CFLAGS) $(MEDIASTREAMER_CFLAGS) $(CUNIT_CFLAGS) $(BELLESIP_CFLAGS) $(LIBXML2_CFLAGS)
if BUILD_IOS
#we build the liblinphonetester as a library, not as an executable, so that it is usable in XCode
liblinphonetester_la_OBJCFLAGS = $(AM_CFLAGS)
liblinphonetester_la_SOURCES += liblinphonetester_ios.m liblinphonetester_ios.h
liblinphonetester_la_LDFLAGS = -framework CoreFoundation -framework AudioToolbox -framework CoreAudio -framework Foundation -framework QuartzCore -framework OpenGLES -framework UIKit -framework AVFoundation $(CUNIT_LIBS)
else
if !BUILD_IOS
noinst_PROGRAMS = liblinphone_tester

View file

@ -1,24 +0,0 @@
/*
liblinphone_tester - liblinphone test suite
Copyright (C) 2013 Belledonne Communications SARL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "ortp/ortp.h"
int apple_start_tests(int argc, char* argv[]);
void liblinphone_tester_ios_log_handler(OrtpLogLevel level, const char* fmt, va_list args);

View file

@ -1,46 +0,0 @@
/*
liblinphone_tester - liblinphone test suite
Copyright (C) 2013 Belledonne Communications SARL
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "liblinphonetester_ios.h"
#include <pthread.h>
#import <CoreFoundation/CoreFoundation.h>
#import <Foundation/Foundation.h>
extern int ios_tester_main(int argc, char * argv[]);
int g_argc;
char** g_argv;
static void* apple_main(void* data) {
ios_tester_main(g_argc,g_argv);
return NULL;
}
int apple_start_tests(int argc, char* argv[])
{
pthread_t main_thread;
g_argc=argc;
g_argv=argv;
return (int)pthread_create(&main_thread,NULL,apple_main,NULL);
}
void liblinphone_tester_ios_log_handler(OrtpLogLevel level, const char* fmt, va_list args)
{
NSLogv([NSString stringWithUTF8String:fmt], args);
}