-reducing testing peers and links
[oweals/gnunet.git] / src / testbed / test_testbed_api_testbed_run.c
index 69e6fb8c982834b67555a2d6835defef078228af..349dc492399f30b6424224b39e9750e9d98c61f2 100644 (file)
@@ -31,7 +31,7 @@
 /**
  * Number of peers we want to start
  */
-#define NUM_PEERS 13
+#define NUM_PEERS 5
 
 /**
  * The array of peers; we fill this as the peers are given to us by the testbed
@@ -156,7 +156,7 @@ run (void *cls, char *const *args, const char *cfgfile,
                       NULL, &master_task, NULL);
   abort_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
-                                    (GNUNET_TIME_UNIT_SECONDS, 60), &do_abort,
+                                    (GNUNET_TIME_UNIT_SECONDS, 300), &do_abort,
                                     NULL);
 }
 
@@ -179,13 +179,25 @@ main (int argc, char **argv)
   char *config_filename;
   int ret;
 
-  testname = strrchr (argv[0], (int) '_');
-  testname++;
-  if (NULL == testname)
+  if (NULL == (testname = strrchr (argv[0], (int) '_')))
   {
     GNUNET_break (0);
     return 1;
   }
+  testname++;
+  testname = GNUNET_strdup (testname);
+#ifdef MINGW
+  {
+    char *period;
+
+    /* check and remove .exe extension */
+    period = strrchr (testname, (int) '.');
+    if (NULL != period)
+      *period = '\0';
+    else
+      GNUNET_break (0);         /* Windows with no .exe? */
+  }
+#endif
   if (0 != strcmp ("run", testname))
   {
     GNUNET_asprintf (&config_filename, 
@@ -193,6 +205,7 @@ main (int argc, char **argv)
   }
   else
     config_filename = GNUNET_strdup ("test_testbed_api.conf");
+  GNUNET_free (testname);
   argv2[2] = config_filename;
   result = GNUNET_SYSERR;
   ret =