Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Mask the diff when logging at error level or higher; mask the command line anyway...
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 29 May 2007 10:01:16 +0000 (10:01 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 29 May 2007 10:01:16 +0000 (10:01 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3539 48e7efb5-ca39-0410-a469-dd3cf9ba447f

tools/tesh/run_context.c

index 966d44a..e863b30 100644 (file)
@@ -390,8 +390,11 @@ void *rctx_wait(void* r) {
       && (    rctx->output_got->used != rctx->output_wanted->used
           || strcmp(rctx->output_got->data, rctx->output_wanted->data))) {
     char *diff= xbt_str_diff(rctx->output_wanted->data,rctx->output_got->data);
-    ERROR2("Output of child \"%s\" don't match expectations. Here is a diff between expected and got output:\n%s",
-          rctx->cmd,diff);
+    if (XBT_LOG_ISENABLED(tesh,xbt_log_priority_info))
+       ERROR1("Child's output don't match expectations. Here is a diff between expected and got output:\n%s",
+             diff);
+    else
+       ERROR0("Child's output don't match expectations");
     free(diff);
     errcode=2;
   } else if (!rctx->check_output) {