diff --git a/TestsLiblinphone/LinphoneTester_Tests.m b/TestsLiblinphone/LinphoneTester_Tests.m index 8a4877065..dce866f2f 100644 --- a/TestsLiblinphone/LinphoneTester_Tests.m +++ b/TestsLiblinphone/LinphoneTester_Tests.m @@ -21,8 +21,7 @@ @implementation LinphoneTester_Tests + (NSArray *)skippedSuites { - NSArray *skipped_suites = @[ @"Flexisip" ]; - return skipped_suites; + return @[ @"Flexisip" ]; } + (NSString *)safetyTestString:(NSString *)testString { @@ -35,38 +34,13 @@ void tester_logs_handler(int level, const char *fmt, va_list args) { } + (void)initialize { -#if TARGET_IPHONE_SIMULATOR - [Log enableLogs:ORTP_DEBUG]; -#else - // turn off logs since xcodebuild fails to retrieve whole output otherwise on - // real device. If you need to debug, comment this line temporary - [Log enableLogs:NO]; -#endif - - bc_tester_init(tester_logs_handler, ORTP_MESSAGE, ORTP_ERROR, "rcfiles"); - liblinphone_tester_add_suites(); - - NSString *bundlePath = [[NSBundle mainBundle] bundlePath]; - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); - NSString *writablePath = [paths objectAtIndex:0]; - - LOGI(@"Bundle path: %@", bundlePath); - LOGI(@"Document path: %@", writablePath); - - bc_tester_set_resource_dir_prefix(bundlePath.UTF8String); - bc_tester_set_writable_dir_prefix(writablePath.UTF8String); - - liblinphonetester_ipv6 = true; - - liblinphone_tester_keep_accounts(TRUE); - int count = bc_tester_nb_suites(); - - for (int i = 0; i < count; i++) { + 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); for (int k = 0; k < test_count; k++) { const char *test = bc_tester_test_name(suite, k); + LOGE(@"\ttest = %s", test); NSString *sSuite = [NSString stringWithUTF8String:suite]; NSString *sTest = [NSString stringWithUTF8String:test]; @@ -95,7 +69,7 @@ void tester_logs_handler(int level, const char *fmt, va_list args) { - (void)testForSuite:(NSString *)suite andTest:(NSString *)test { LOGI(@"Launching test %@ from suite %@", test, suite); - XCTAssertFalse(bc_tester_run_tests([suite UTF8String], [test UTF8String], NULL), @"Suite '%@' / Test '%@' failed", + XCTAssertFalse(bc_tester_run_tests(suite.UTF8String, test.UTF8String, NULL), @"Suite '%@' / Test '%@' failed", suite, test); }