Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
last modification of the tesh2 files (variable extend and some corrections)
[simgrid.git] / tools / tesh2 / src / command.c
index 3e11849..958c0f4 100644 (file)
@@ -162,7 +162,7 @@ command_new(unit_t unit, context_t context, xbt_os_mutex_t mutex)
 int\r
 command_run(command_t command)\r
 {\r
-       if(!silent_flag)\r
+       if(!silent_flag && !interrupted)\r
                INFO2("[%s] %s",command->context->pos, command->context->command_line);\r
        \r
        if(!just_print_flag)\r
@@ -208,7 +208,13 @@ command_start(void* p)
        xbt_os_mutex_release(command->mutex);\r
        \r
        /* execute the command of the test */\r
+\r
+       #ifndef WIN32\r
        command_exec(command, command->context->command_line);\r
+       #else\r
+       /* play the translated command line on Windows */\r
+       command_exec(command, command->context->t_command_line);\r
+       #endif\r
        \r
        if(cs_in_progress == command->status)\r
        {\r
@@ -816,7 +822,7 @@ command_check(command_t command)
        xbt_strbuff_trim(command->output);\r
        xbt_strbuff_trim(command->context->output);\r
 \r
-       if(!success)\r
+       if(!success &&  !strcmp(command->output->data, command->context->output->data))\r
        {\r
                xbt_dynar_t a = xbt_str_split(command->output->data, "\n");\r
                char *out = xbt_str_join(a,"\n||");\r
@@ -830,6 +836,7 @@ command_check(command_t command)
                if(command->output->used != command->context->output->used || strcmp(command->output->data, command->context->output->data))\r
                {\r
                        char *diff;\r
+\r
                        \r
                        ERROR2("[%s] `%s' : NOK (outputs mismatch):", command->context->pos, command->context->command_line);\r
                        \r