summaryrefslogtreecommitdiff
path: root/test/birdtest.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-12-17 00:01:53 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-12-17 00:01:53 +0100
commit3dabf7b8d09c3188ea41b7e2f763397946943778 (patch)
treecbff2eaaf2be437defb87ff0fcb77427295400d5 /test/birdtest.c
parent3232d1718636eb7617fedc7b27378cd1d8f8691d (diff)
Test: Improve filter_test
Initial parsing of test.conf must be done directly in filter_test main, while reconfiguration is handled as a regular test. Also fix several minor issues in test code.
Diffstat (limited to 'test/birdtest.c')
-rw-r--r--test/birdtest.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/birdtest.c b/test/birdtest.c
index 9e258c80..a092446a 100644
--- a/test/birdtest.c
+++ b/test/birdtest.c
@@ -117,6 +117,7 @@ bt_init(int argc, char *argv[])
}
clock_gettime(CLOCK_MONOTONIC, &bt_begin);
+ bt_suite_case_begin = bt_suite_begin = bt_begin;
return;
@@ -198,14 +199,13 @@ bt_log_result(int result, u64 time, const char *fmt, va_list argptr)
static char msg_buf[BT_BUFFER_SIZE];
char *pos;
- snprintf(msg_buf, sizeof(msg_buf), "%s%s%s%s %" PRIu64 ".%09" PRIu64 "s",
+ snprintf(msg_buf, sizeof(msg_buf), "%s%s%s %" PRIu64 ".%09" PRIu64 "s%s",
bt_filename,
bt_test_id ? ": " : "",
bt_test_id ? bt_test_id : "",
- (fmt && strlen(fmt) > 0) ? ": " : "",
time / 1000000000,
- time % 1000000000
- );
+ time % 1000000000,
+ (fmt && strlen(fmt) > 0) ? ": " : "");
pos = msg_buf + strlen(msg_buf);
if (fmt)
@@ -339,6 +339,7 @@ bt_test_suite_base(int (*fn)(const void *), const char *id, const void *fn_arg,
bt_log("Starting");
clock_gettime(CLOCK_MONOTONIC, &bt_suite_begin);
+ bt_suite_case_begin = bt_suite_begin;
if (!forked)
{