forked from mirrors/linphone-iphone
Use properties for bundle path in linphone tester
+ cleanup + add resource files for the tester
This commit is contained in:
parent
07a8a00c3f
commit
30b5402c6c
3 changed files with 23 additions and 28 deletions
|
|
@ -12,14 +12,11 @@
|
|||
#import "NSObject+DTRuntime.h"
|
||||
|
||||
@interface LinphoneTester_Tests : XCTestCase
|
||||
|
||||
@property (retain, nonatomic) NSString* bundlePath;
|
||||
@property (retain, nonatomic) NSString* documentPath;
|
||||
@end
|
||||
|
||||
@implementation LinphoneTester_Tests {
|
||||
NSString* bundlePath;
|
||||
NSString* documentPath;
|
||||
}
|
||||
|
||||
@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];
|
||||
|
|
@ -40,14 +37,14 @@ void LSLog(NSString* fmt, ...){
|
|||
- (id)init {
|
||||
self = [super init];
|
||||
if( self ){
|
||||
bundlePath = [[NSBundle mainBundle] bundlePath];
|
||||
self.bundlePath = [[NSBundle mainBundle] bundlePath];
|
||||
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
|
||||
documentPath = [paths objectAtIndex:0];
|
||||
LSLog(@"Bundle path: %@", bundlePath);
|
||||
LSLog(@"Document path: %@", documentPath);
|
||||
self.documentPath = [paths objectAtIndex:0];
|
||||
LSLog(@"Bundle path: %@", self.bundlePath);
|
||||
LSLog(@"Document path: %@", self.documentPath);
|
||||
|
||||
liblinphone_tester_set_fileprefix([bundlePath UTF8String]);
|
||||
liblinphone_tester_set_writable_dir_prefix( ms_strdup([documentPath UTF8String]) );
|
||||
liblinphone_tester_set_fileprefix([self.bundlePath UTF8String]);
|
||||
liblinphone_tester_set_writable_dir_prefix( [self.documentPath UTF8String] );
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,22 +46,6 @@ void LSLog(NSString* fmt, ...){
|
|||
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);
|
||||
|
||||
// [logsBuffer addObject:log];
|
||||
//
|
||||
// if (logsBuffer.count >= kLogsBufferCapacity ) {
|
||||
// [lastLogs addObjectsFromArray:logsBuffer];
|
||||
//
|
||||
// if( lastLogs.count >= kLastLogsCapacity - kLogsBufferCapacity ){
|
||||
// [lastLogs removeObjectsInRange:NSMakeRange(0, kLogsBufferCapacity)];
|
||||
// }
|
||||
// [[NSNotificationCenter defaultCenter] postNotificationName:kLogsUpdateNotification
|
||||
// object:nil
|
||||
// userInfo:@{@"newlogs": [logsBuffer copy]}];
|
||||
// [logsBuffer removeAllObjects];
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)setupLogging {
|
||||
|
|
|
|||
|
|
@ -771,6 +771,13 @@
|
|||
F0C1F9141A28781F009402C9 /* logo.png in Resources */ = {isa = PBXBuildFile; fileRef = F0C1F90A1A28781F009402C9 /* logo.png */; };
|
||||
F0C1F9151A28781F009402C9 /* strech-bottom.png in Resources */ = {isa = PBXBuildFile; fileRef = F0C1F90B1A28781F009402C9 /* strech-bottom.png */; };
|
||||
F0C1F9161A28781F009402C9 /* strech-top.png in Resources */ = {isa = PBXBuildFile; fileRef = F0C1F90C1A28781F009402C9 /* strech-top.png */; };
|
||||
F0C1F91D1A2CA345009402C9 /* local_tester_hosts in Resources */ = {isa = PBXBuildFile; fileRef = F0BB8C40193630CA00974404 /* local_tester_hosts */; };
|
||||
F0C1F91E1A2CA352009402C9 /* marie_xml in Resources */ = {isa = PBXBuildFile; fileRef = F0BB8C41193630CA00974404 /* marie_xml */; };
|
||||
F0C1F91F1A2CA354009402C9 /* tester_hosts in Resources */ = {isa = PBXBuildFile; fileRef = F0BB8C42193630CA00974404 /* tester_hosts */; };
|
||||
F0C1F9201A2CA358009402C9 /* rcfiles in Resources */ = {isa = PBXBuildFile; fileRef = F0BB8C3719362C1500974404 /* rcfiles */; };
|
||||
F0C1F9211A2CA35A009402C9 /* sounds in Resources */ = {isa = PBXBuildFile; fileRef = F0BB8C3B19362C2200974404 /* sounds */; };
|
||||
F0C1F9221A2CA35C009402C9 /* images in Resources */ = {isa = PBXBuildFile; fileRef = F0BB8C3A19362C2200974404 /* images */; };
|
||||
F0C1F9231A2CA35E009402C9 /* certificates in Resources */ = {isa = PBXBuildFile; fileRef = F0BB8C3919362C2200974404 /* certificates */; };
|
||||
F476004B147AAF2800FFF19B /* liblinphone.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2211DB911475562600DEE054 /* liblinphone.a */; };
|
||||
F84015BF1939FE37006ABAB5 /* test_failed.png in Resources */ = {isa = PBXBuildFile; fileRef = F84015BC1939FE37006ABAB5 /* test_failed.png */; };
|
||||
F84015C01939FE37006ABAB5 /* test_inprogress.png in Resources */ = {isa = PBXBuildFile; fileRef = F84015BD1939FE37006ABAB5 /* test_inprogress.png */; };
|
||||
|
|
@ -3675,7 +3682,14 @@
|
|||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F08F119A19C09D88007D70C2 /* flexisip in Resources */,
|
||||
F0C1F91D1A2CA345009402C9 /* local_tester_hosts in Resources */,
|
||||
F0C1F9211A2CA35A009402C9 /* sounds in Resources */,
|
||||
F08F118D19C09C6B007D70C2 /* InfoPlist.strings in Resources */,
|
||||
F0C1F9231A2CA35E009402C9 /* certificates in Resources */,
|
||||
F0C1F9221A2CA35C009402C9 /* images in Resources */,
|
||||
F0C1F9201A2CA358009402C9 /* rcfiles in Resources */,
|
||||
F0C1F91F1A2CA354009402C9 /* tester_hosts in Resources */,
|
||||
F0C1F91E1A2CA352009402C9 /* marie_xml in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue