Skip to content
Snippets Groups Projects
Commit 8f90378b authored by Matthew Jordan's avatar Matthew Jordan
Browse files

Pipe test output through test object not stdout

Otherwise, it doesn't show up in the automated test failures


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent d759158f
No related branches found
No related tags found
No related merge requests found
......@@ -58,13 +58,15 @@ struct hash_test {
int preload;
/*! When to give up on the tests */
struct timeval deadline;
/*! The actual test object */
struct ast_test *test;
};
static int is_timed_out(struct hash_test const *data) {
struct timeval now = ast_tvnow();
int val = ast_tvdiff_us(data->deadline, now) < 0;
if (val) {
printf("Now: %ld.%06ld Deadline: %ld.%06ld\n",
ast_test_status_update(data->test, "Now: %ld.%06ld Deadline: %ld.%06ld\n",
now.tv_sec, now.tv_usec,
data->deadline.tv_sec, data->deadline.tv_usec);
}
......@@ -240,6 +242,7 @@ AST_TEST_DEFINE(hash_test)
}
ast_test_status_update(test, "Executing hash concurrency test...\n");
data.test = test;
data.preload = MAX_HASH_ENTRIES / 2;
data.max_grow = MAX_HASH_ENTRIES - data.preload;
data.deadline = ast_tvadd(ast_tvnow(), ast_tv(MAX_TEST_SECONDS, 0));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment