test: improve tap output on test failures
Print `errmsg` on TAP output. After making the TAP output the default, the info in `errmsg` was not being used anymore. PR-URL: https://github.com/libuv/libuv/pull/1012 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Imran Iqbal <imran@imraniqbal.org> Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
f4ef897666
commit
282dc7bc22
@ -145,7 +145,7 @@ void log_tap_result(int test_count,
|
||||
int run_test(const char* test,
|
||||
int benchmark_output,
|
||||
int test_count) {
|
||||
char errmsg[1024] = "no error";
|
||||
char errmsg[1024] = "";
|
||||
process_info_t processes[1024];
|
||||
process_info_t *main_proc;
|
||||
task_entry_t* task;
|
||||
@ -274,6 +274,8 @@ out:
|
||||
|
||||
/* Show error and output from processes if the test failed. */
|
||||
if ((status != TEST_OK && status != TEST_SKIP) || task->show_output) {
|
||||
if (strlen(errmsg) > 0)
|
||||
fprintf(stderr, "# %s\n", errmsg);
|
||||
fprintf(stderr, "# ");
|
||||
fflush(stderr);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user