Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[tesh] allow to specify the length of the sorting prefix
[simgrid.git] / tools / tesh / tesh.c
index 628f856..490e8c2 100644 (file)
@@ -20,8 +20,9 @@ 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 *testsuite_name;
+const char *testsuite_name;
 static void handle_line(const char *filepos, char *line)
 {
   /* Search end */
@@ -241,8 +242,9 @@ int main(int argc, char *argv[])
   /* Find the description file */
   if (argc == 1) {
     INFO0("Test suite from stdin");
-    testsuite_name = xbt_strdup("(stdin)");
-    handle_suite("stdin", stdin);
+    testsuite_name = "(stdin)";
+    handle_suite(testsuite_name, stdin);
+    rctx_wait_bg();
     INFO0("Test suite from stdin OK");
 
   } else {