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 cd96399..b4659fc 100644 (file)
@@ -21,8 +21,14 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(tesh, "TEst SHell utility");
 /*** Options ***/
 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;
+
+xbt_dict_t env;
+
 static void handle_line(const char *filepos, char *line)
 {
   /* Search end */
@@ -250,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 */