Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Be more verbose about which command which message refers to, or it gets hairly with...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 8 Jun 2007 06:38:18 +0000 (06:38 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Fri, 8 Jun 2007 06:38:18 +0000 (06:38 +0000)
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
tools/tesh/run_context.c
tools/tesh/set-ignore-output.tesh

index c161efe..8fa8bce 100644 (file)
@@ -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
 $ ./tesh --log='log.thresh:info tesh.fmt:%m%n'
 > Test suite from stdin
 > [stdin:3] cat
-> Output mismatch:
+> Output of <stdin:3> mismatch:
 > - TOTO
 > + TUTU
 > Test suite `(stdin)': NOK (<stdin:3> output mismatch)
 > - TOTO
 > + TUTU
 > Test suite `(stdin)': NOK (<stdin:3> output mismatch)
index b234a08..7acab0f 100644 (file)
@@ -85,7 +85,7 @@ void rctx_armageddon(rctx_t initiator, int exitcode) {
   } 
 
   /* Cleanup the place */
   } 
 
   /* Cleanup the place */
-  xbt_dynar_free(&bg_jobs);
+  //  xbt_dynar_free(&bg_jobs);
 
   exit(exitcode);
 }
 
   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);       
           || 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)", 
        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) {
      
     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||");
   } 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||");
index 01de5b4..6697a40 100644 (file)
@@ -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
 $ ./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 <stdin:4> as requested)
 > Test suite from stdin OK
 > Test suite from stdin OK