diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-30 17:50:52 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-30 17:50:52 +0000 |
commit | 30a41632d36fe0d5b17ab2dec2b88c78f581714b (patch) | |
tree | e3e0d099d696b0aad9c905ea29e1c24fa843a983 /tests | |
parent | 58a435db92fdaf4b3bd6373d04319472bbf57352 (diff) |
More Solaris compatibility fixes
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@289543 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_time.c | 12 | ||||
-rw-r--r-- | tests/test_utils.c | 3 |
2 files changed, 12 insertions, 3 deletions
diff --git a/tests/test_time.c b/tests/test_time.c index 0fca0fd55..c81c9bb12 100644 --- a/tests/test_time.c +++ b/tests/test_time.c @@ -73,7 +73,13 @@ AST_TEST_DEFINE(test_timezone_watch) } snprintf(tzfile, sizeof(tzfile), "%s/test", tmpdir); - for (type = 0; type < 2; type++) { + for (type = 0; type < +#ifdef SOLARIS + 1 /* Solaris doesn't use symlinks for timezones */ +#else + 2 +#endif + ; type++) { ast_test_status_update(test, "Executing %s test...\n", type == 0 ? "deletion" : "symlink"); for (i = 0; i < ARRAY_LEN(zones); i++) { int system_res; @@ -81,8 +87,8 @@ AST_TEST_DEFINE(test_timezone_watch) if ((system_res = ast_safe_system(syscmd))) { ast_log(LOG_WARNING, "system(%s) returned non-zero: %d\n", syscmd, system_res); } - ast_localtime_wakeup_monitor(); - sched_yield(); + ast_localtime_wakeup_monitor(test); + ast_test_status_update(test, "Querying timezone %s\n", tzfile); ast_localtime(&tv, &atm[i], tzfile); if (i != 0) { if (atm[i].tm_hour == atm[i - 1].tm_hour) { diff --git a/tests/test_utils.c b/tests/test_utils.c index ceeb57c3e..b7a368a7d 100644 --- a/tests/test_utils.c +++ b/tests/test_utils.c @@ -325,15 +325,18 @@ AST_TEST_DEFINE(agi_loaded_test) #endif if (ast_agi_register(ast_module_info->self, &noop_command) == AST_OPTIONAL_API_UNAVAILABLE) { + ast_test_status_update(test, "Unable to register testnoop command, because res_agi is not loaded.\n"); return AST_TEST_FAIL; } #ifndef HAVE_NULLSAFE_PRINTF /* Test for condition without actually crashing Asterisk */ if (noop_command.usage == NULL) { + ast_test_status_update(test, "AGI testnoop usage was not updated properly.\n"); res = AST_TEST_FAIL; } if (noop_command.syntax == NULL) { + ast_test_status_update(test, "AGI testnoop syntax was not updated properly.\n"); res = AST_TEST_FAIL; } #endif |