From 49d2ae33ef4f871496e042ed83cf5a7c65b97857 Mon Sep 17 00:00:00 2001 From: Timothy J Fontaine Date: Wed, 27 Feb 2013 13:39:10 -0800 Subject: [PATCH] test: fix tap output even when ok but have output --- test/runner.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/runner.c b/test/runner.c index a269b310..bda1080a 100644 --- a/test/runner.c +++ b/test/runner.c @@ -255,10 +255,17 @@ out: FATAL("process_wait failed"); } + if (tap_output) { + if (status == 0) + LOGF("ok %d - %s\n", test_count, test); + else + LOGF("not ok %d - %s\n", test_count, test); + } + /* Show error and output from processes if the test failed. */ if (status != 0 || task->show_output) { - if (tap_output && status != 0) { - LOGF("not ok %d - %s\n#", test_count, test); + if (tap_output) { + LOGF("#"); } else if (status != 0) { LOGF("\n`%s` failed: %s\n", test, errmsg); } else { @@ -305,8 +312,6 @@ out: } break; } - } else if (tap_output) { - LOGF("ok %d - %s\n", test_count, test); } /* Clean up all process handles. */