From 938c720364732926dd913b4825aa3cb03129313c Mon Sep 17 00:00:00 2001 From: mquinson Date: Fri, 8 Jun 2007 06:38:18 +0000 Subject: [PATCH] Be more verbose about which command which message refers to, or it gets hairly with background commands git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3584 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- tools/tesh/catch-wrong-output.tesh | 2 +- tools/tesh/run_context.c | 7 +++---- tools/tesh/set-ignore-output.tesh | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/tesh/catch-wrong-output.tesh b/tools/tesh/catch-wrong-output.tesh index c161efea77..8fa8bceed0 100644 --- a/tools/tesh/catch-wrong-output.tesh +++ b/tools/tesh/catch-wrong-output.tesh @@ -9,7 +9,7 @@ p This tests whether TESH detects wrong outputs $ ./tesh --log='log.thresh:info tesh.fmt:%m%n' > Test suite from stdin > [stdin:3] cat -> Output mismatch: +> Output of mismatch: > - TOTO > + TUTU > Test suite `(stdin)': NOK ( output mismatch) diff --git a/tools/tesh/run_context.c b/tools/tesh/run_context.c index b234a084ac..7acab0f557 100644 --- a/tools/tesh/run_context.c +++ b/tools/tesh/run_context.c @@ -85,7 +85,7 @@ void rctx_armageddon(rctx_t initiator, int exitcode) { } /* Cleanup the place */ - xbt_dynar_free(&bg_jobs); + // xbt_dynar_free(&bg_jobs); exit(exitcode); } @@ -491,8 +491,7 @@ void *rctx_wait(void* r) { || strcmp(rctx->output_got->data, rctx->output_wanted->data))) { if (XBT_LOG_ISENABLED(tesh,xbt_log_priority_info)) { char *diff= xbt_str_diff(rctx->output_wanted->data,rctx->output_got->data); - ERROR1("Output mismatch:\n%s", - diff); + ERROR2("Output of <%s> mismatch:\n%s",rctx->filepos,diff); free(diff); } ERROR2("Test suite `%s': NOK (<%s> output mismatch)", @@ -500,7 +499,7 @@ void *rctx_wait(void* r) { errcode=2; } else if (rctx->output == e_output_ignore) { - INFO0("(ignoring the output as requested)"); + INFO1("(ignoring the output of <%s> as requested)",rctx->filepos); } else if (rctx->output == e_output_display) { xbt_dynar_t a = xbt_str_split(rctx->output_got->data, "\n"); char *out = xbt_str_join(a,"\n||"); diff --git a/tools/tesh/set-ignore-output.tesh b/tools/tesh/set-ignore-output.tesh index 01de5b476a..6697a407d5 100644 --- a/tools/tesh/set-ignore-output.tesh +++ b/tools/tesh/set-ignore-output.tesh @@ -9,5 +9,5 @@ p This tests whether TESH accepts to ignore command output $ ./tesh --log='log.thresh:info tesh.fmt:%m%n' > Test suite from stdin > [stdin:4] cat -> (ignoring the output as requested) +> (ignoring the output of as requested) > Test suite from stdin OK -- 2.20.1