mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 00:59:20 +00:00
Fix (possibly?) the problem of paths in liblinphone tester
This commit is contained in:
parent
30b5402c6c
commit
21a242acfe
1 changed files with 12 additions and 20 deletions
|
|
@ -17,7 +17,6 @@
|
|||
@end
|
||||
|
||||
@implementation LinphoneTester_Tests
|
||||
|
||||
static void linphone_log_function(OrtpLogLevel lev, const char *fmt, va_list args) {
|
||||
NSString* log = [[NSString alloc] initWithFormat:[NSString stringWithUTF8String:fmt] arguments:args];
|
||||
NSLog(@"%@",log);
|
||||
|
|
@ -32,23 +31,6 @@ void LSLog(NSString* fmt, ...){
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
- (id)init {
|
||||
self = [super init];
|
||||
if( self ){
|
||||
self.bundlePath = [[NSBundle mainBundle] bundlePath];
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
self.documentPath = [paths objectAtIndex:0];
|
||||
LSLog(@"Bundle path: %@", self.bundlePath);
|
||||
LSLog(@"Document path: %@", self.documentPath);
|
||||
|
||||
liblinphone_tester_set_fileprefix([self.bundlePath UTF8String]);
|
||||
liblinphone_tester_set_writable_dir_prefix( [self.documentPath UTF8String] );
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (NSArray*)skippedSuites {
|
||||
NSArray* skipped_suites = @[@"Flexisip"];
|
||||
return skipped_suites;
|
||||
|
|
@ -61,8 +43,20 @@ void LSLog(NSString* fmt, ...){
|
|||
}
|
||||
|
||||
|
||||
|
||||
+ (void)initialize {
|
||||
|
||||
static char * bundle = NULL;
|
||||
static char * documents = NULL;
|
||||
liblinphone_tester_init();
|
||||
NSString* bundlePath = [[NSBundle mainBundle] bundlePath];
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
NSString* documentPath = [paths objectAtIndex:0];
|
||||
bundle = ms_strdup([bundlePath UTF8String]);
|
||||
documents = ms_strdup([documentPath UTF8String]);
|
||||
|
||||
LSLog(@"Bundle path: %@", bundlePath);
|
||||
LSLog(@"Document path: %@", documentPath);
|
||||
|
||||
int count = liblinphone_tester_nb_test_suites();
|
||||
|
||||
|
|
@ -91,12 +85,10 @@ void LSLog(NSString* fmt, ...){
|
|||
- (void)setUp
|
||||
{
|
||||
[super setUp];
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
- (void)tearDown
|
||||
{
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
[super tearDown];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue