Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add an option on tesh to ignore output of code coverage.
[simgrid.git] / tools / tesh / tesh.c
index 34c92b1..b4659fc 100644 (file)
@@ -22,6 +22,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(tesh, "TEst SHell utility");
 int timeout_value = 5;          /* child timeout value */
 int sort_len = 19;              /* length of the prefix to sort */
 char *option;
+int coverage = 0;                              /* whether the code coverage is enable */
 
 rctx_t rctx;
 const char *testsuite_name;
@@ -255,6 +256,13 @@ int main(int argc, char *argv[])
       argc -= 2;
       i -= 2;
     }
+    else if (!strcmp(argv[i], "--enable-coverage" )){
+       coverage = 1;
+       XBT_INFO("Enable coverage");
+       memmove(argv + i, argv + i + 1, (argc - i - 1) * sizeof(char *));
+       argc -= 1;
+       i -= 1;
+    }
   }
 
   /* Find the description file */