[openssl-commits] [openssl] master update
Richard Levitte
levitte at openssl.org
Tue Apr 25 19:28:27 UTC 2017
The branch master has been updated
via 7531b3a6cd4b42bece94c0aab5b963fe03d1b139 (commit)
from 4114f8f0b686958aeb678feea37e058d0c9f3d72 (commit)
- Log -----------------------------------------------------------------
commit 7531b3a6cd4b42bece94c0aab5b963fe03d1b139
Author: Richard Levitte <levitte at openssl.org>
Date: Tue Apr 25 21:13:26 2017 +0200
Tapify libtestutil a bit better
This includes better signals of skips and subtests according to TAP 12,
and flushing stdout and stderr at the end of every test function to
make sure we get the output in good order.
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3309)
-----------------------------------------------------------------------
Summary of changes:
test/testutil/driver.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/test/testutil/driver.c b/test/testutil/driver.c
index 4f6b511..29c97a9 100644
--- a/test/testutil/driver.c
+++ b/test/testutil/driver.c
@@ -138,13 +138,23 @@ int run_tests(const char *test_prog_name)
char *verdict = NULL;
int i, j;
- helper_printf_stdout("%*s%d..%d\n", level, "", 1, num_tests);
+ if (num_tests < 1)
+ helper_printf_stdout("%*s1..0 # Skipped: %s\n", level, "",
+ test_prog_name);
+ else if (level > 0)
+ helper_printf_stdout("%*s1..%d # Subtest: %s\n", level, "", num_tests,
+ test_prog_name);
+ else
+ helper_printf_stdout("%*s1..%d\n", level, "", num_tests);
test_flush_stdout();
for (i = 0; i != num_tests; ++i) {
if (all_tests[i].num == -1) {
int ret = all_tests[i].test_fn();
+ test_flush_stdout();
+ test_flush_stderr();
+
verdict = "ok";
if (!ret) {
verdict = "not ok";
@@ -169,6 +179,9 @@ int run_tests(const char *test_prog_name)
for (j = 0; j < all_tests[i].num; j++) {
int ret = all_tests[i].param_test_fn(j);
+ test_flush_stdout();
+ test_flush_stderr();
+
if (!ret)
++num_failed_inner;
More information about the openssl-commits
mailing list