diff --git a/LiblinphoneTester/MasterView.m b/LiblinphoneTester/MasterView.m index 2902da4f2..8fe3cf8d9 100644 --- a/LiblinphoneTester/MasterView.m +++ b/LiblinphoneTester/MasterView.m @@ -32,7 +32,7 @@ - (void)setupLogging { [Log enableLogs:ORTP_DEBUG]; - linphone_core_enable_log_collection(NO); + linphone_core_enable_log_collection(YES); } void tester_logs_handler(int level, const char *fmt, va_list args) { @@ -45,15 +45,16 @@ void tester_logs_handler(int level, const char *fmt, va_list args) { self.detailViewController = (DetailTableView *)[[self.splitViewController.viewControllers lastObject] topViewController]; - [self setupLogging]; + //[self setupLogging]; liblinphone_tester_keep_accounts(TRUE); bundlePath = [[NSBundle mainBundle] bundlePath]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); writablePath = [paths objectAtIndex:0]; - - bc_tester_init(tester_logs_handler, ORTP_MESSAGE, ORTP_ERROR, "rcfiles"); - liblinphone_tester_add_suites(); + liblinphone_tester_init(NULL); + // bc_tester_init(tester_logs_handler, ORTP_MESSAGE, ORTP_ERROR, "rcfiles"); + // liblinphone_tester_add_suites(); + linphone_core_set_log_level_mask((OrtpLogLevel)(ORTP_MESSAGE | ORTP_WARNING | ORTP_ERROR | ORTP_FATAL)); bc_tester_set_resource_dir_prefix([bundlePath UTF8String]); bc_tester_set_writable_dir_prefix([writablePath UTF8String]); @@ -61,6 +62,13 @@ void tester_logs_handler(int level, const char *fmt, va_list args) { LOGI(@"Bundle path: %@", bundlePath); LOGI(@"Writable path: %@", writablePath); + char *xmlFile = bc_tester_file("LibLinphoneIOS.xml"); + char *args[] = {"--xml-file", xmlFile}; + bc_tester_parse_args(2, args, 0); + + char *logFile = bc_tester_file("LibLinphoneIOS.txt"); + liblinphone_tester_set_log_file(logFile); + liblinphonetester_ipv6 = true; int count = bc_tester_nb_suites(); diff --git a/TestsLiblinphone/LinphoneTester_Tests.m b/TestsLiblinphone/LinphoneTester_Tests.m index b9dfa030c..484f0255f 100644 --- a/TestsLiblinphone/LinphoneTester_Tests.m +++ b/TestsLiblinphone/LinphoneTester_Tests.m @@ -27,9 +27,10 @@ void dummy_logger(const char *domain, OrtpLogLevel lev, const char *fmt, va_list + (void)initialize { // turn off ALL logs because xcodebuild has problems with it - linphone_core_enable_logs_with_cb(dummy_logger); - - for (int i = 0; i < bc_tester_nb_suites(); i++) { + // linphone_core_enable_logs_with_cb(dummy_logger); + bc_tester_start(NULL); + bc_tester_uninit(); + /*for (int i = 0; i < bc_tester_nb_suites(); i++) { const char *suite = bc_tester_suite_name(i); LOGE(@"suite = %s", suite); int test_count = bc_tester_nb_tests(suite); @@ -53,7 +54,7 @@ void dummy_logger(const char *domain, OrtpLogLevel lev, const char *fmt, va_list } } } - } + }*/ } - (void)testForSuite:(NSString *)suite andTest:(NSString *)test {