gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r10711 - gnunet/src/testing


From: gnunet
Subject: [GNUnet-SVN] r10711 - gnunet/src/testing
Date: Mon, 29 Mar 2010 19:05:32 +0200

Author: nevans
Date: 2010-03-29 19:05:32 +0200 (Mon, 29 Mar 2010)
New Revision: 10711

Modified:
   gnunet/src/testing/test_testing.c
   gnunet/src/testing/test_testing_connect.c
   gnunet/src/testing/test_testing_group.c
   gnunet/src/testing/test_testing_topology.c
   gnunet/src/testing/testing.c
   gnunet/src/testing/testing_group.c
Log:
remove debugging from testcases, testing now used gnunet-arm to run and stop 
gnunet, removes configs and directories by default.  remote still needs tested

Modified: gnunet/src/testing/test_testing.c
===================================================================
--- gnunet/src/testing/test_testing.c   2010-03-29 17:04:46 UTC (rev 10710)
+++ gnunet/src/testing/test_testing.c   2010-03-29 17:05:32 UTC (rev 10711)
@@ -101,8 +101,7 @@
 #endif
                     NULL);
   ret = check ();
-  sleep (1);                    /* FIXME: make this unnecessary */
-  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing");
+
   return ret;
 }
 

Modified: gnunet/src/testing/test_testing_connect.c
===================================================================
--- gnunet/src/testing/test_testing_connect.c   2010-03-29 17:04:46 UTC (rev 
10710)
+++ gnunet/src/testing/test_testing_connect.c   2010-03-29 17:05:32 UTC (rev 
10711)
@@ -170,10 +170,10 @@
 #endif
                     NULL);
   ret = check ();
-  sleep (1);
+  /*sleep (1);
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing");
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing-connect-peer1");
-  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing-connect-peer2");
+  GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing-connect-peer2");*/
   return ret;
 }
 

Modified: gnunet/src/testing/test_testing_group.c
===================================================================
--- gnunet/src/testing/test_testing_group.c     2010-03-29 17:04:46 UTC (rev 
10710)
+++ gnunet/src/testing/test_testing_group.c     2010-03-29 17:05:32 UTC (rev 
10711)
@@ -109,7 +109,13 @@
 #endif
                     NULL);
   ret = check ();
-  sleep (1);
+  /**
+   * Still need to remove the base testing directory here,
+   * because group starts will create subdirectories under this
+   * main dir.  However, we no longer need to sleep, as the
+   * shutdown sequence won't return until everything is cleaned
+   * up.
+   */
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing");
   return ret;
 }

Modified: gnunet/src/testing/test_testing_topology.c
===================================================================
--- gnunet/src/testing/test_testing_topology.c  2010-03-29 17:04:46 UTC (rev 
10710)
+++ gnunet/src/testing/test_testing_topology.c  2010-03-29 17:05:32 UTC (rev 
10711)
@@ -619,7 +619,11 @@
 #endif
                     NULL);
   ret = check ();
-  sleep (1);
+
+  /**
+   * Need to remove base directory, subdirectories taken care
+   * of by the testing framework.
+   */
   GNUNET_DISK_directory_remove ("/tmp/test-gnunet-testing");
   GNUNET_free(our_binary_name);
   return ret;

Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c        2010-03-29 17:04:46 UTC (rev 10710)
+++ gnunet/src/testing/testing.c        2010-03-29 17:05:32 UTC (rev 10711)
@@ -168,13 +168,13 @@
       /* start GNUnet on remote host */
       if (NULL == d->hostname)
         {
-          d->pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm",
-                                            "gnunet-service-arm",
+          d->pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-arm",
+                                            "gnunet-arm",
                                             "-c", d->cfgfile,
 #if DEBUG_TESTING
                                             "-L", "DEBUG",
 #endif
-                                            "-d", NULL);
+                                            "-s", NULL);
         }
       else
         {
@@ -186,6 +186,9 @@
                                             "ssh",
                                             dst,
                                             "gnunet-arm",
+#if DEBUG_TESTING
+                                            "-L", "DEBUG",
+#endif
                                             "-c", d->cfgfile, "-s", NULL);
           GNUNET_free (dst);
         }
@@ -528,6 +531,9 @@
 
       d->pid = GNUNET_OS_start_process (NULL, NULL, "ssh", "ssh",
                                               arg, "gnunet-arm",
+#if DEBUG_TESTING
+                                              "-L", "DEBUG",
+#endif
                                               "-c", d->cfgfile, "-e", "-d", 
NULL);
       /* Use -e to end arm, and -d to remove temp files */
 
@@ -541,7 +547,10 @@
 #endif
     d->pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-arm",
                                             "gnunet-arm",
-                                            "-c", d->cfgfile, "-e", NULL);
+#if DEBUG_TESTING
+                                            "-L", "DEBUG",
+#endif
+                                            "-c", d->cfgfile, "-e", "-d", 
NULL);
   }
 
   d->wait_runs = 0;

Modified: gnunet/src/testing/testing_group.c
===================================================================
--- gnunet/src/testing/testing_group.c  2010-03-29 17:04:46 UTC (rev 10710)
+++ gnunet/src/testing/testing_group.c  2010-03-29 17:05:32 UTC (rev 10711)
@@ -27,7 +27,7 @@
 #include "gnunet_arm_service.h"
 #include "gnunet_testing_lib.h"
 
-#define VERBOSE_TESTING GNUNET_YES
+#define VERBOSE_TESTING GNUNET_NO
 
 /**
  * Lowest port used for GNUnet testing.  Should be high enough to not
@@ -213,8 +213,8 @@
  * Create a new configuration using the given configuration
  * as a template; however, each PORT in the existing cfg
  * must be renumbered by incrementing "*port".  If we run
- * out of "*port" numbers, return NULL. 
- * 
+ * out of "*port" numbers, return NULL.
+ *
  * @param cfg template configuration
  * @param port port numbers to use, update to reflect
  *             port numbers that were used
@@ -330,9 +330,9 @@
   int connect_attempts;
 
   logNModifier = 0.5; /* FIXME: default value? */
-  if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string(pg->cfg, 
+  if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string(pg->cfg,
                                                         "TESTING",
-                                                        "LOGNMODIFIER", 
+                                                        "LOGNMODIFIER",
                                                         &p_string))
     {
       if (sscanf(p_string, "%lf", &logNModifier) != 1)
@@ -500,7 +500,7 @@
   square = floor (sqrt (pg->total));
   rows = square;
   cols = square;
-  
+
   percentage = 0.5; /* FIXME: default percentage? */
   if (GNUNET_OK == GNUNET_CONFIGURATION_get_value_string(pg->cfg,
                                                         "TESTING",
@@ -842,7 +842,7 @@
 
       if (GNUNET_OK !=
          GNUNET_CONFIGURATION_get_value_string(pg->peers[pg_iter].daemon->cfg, 
"PATHS", "SERVICEHOME", &temp_service_path))
-       {         
+       {
           GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                      _("No `%s' specified in peer configuration in section 
`%s', cannot copy friends file!\n"),
                      "SERVICEHOME",
@@ -1134,7 +1134,7 @@
  * adjusted to ensure that no two peers running on the same system
  * have the same port(s) in their respective configurations.
  *
- * @param sched scheduler to use 
+ * @param sched scheduler to use
  * @param cfg configuration template to use
  * @param total number of daemons to start
  * @param cb function to call on each daemon that was started
@@ -1301,7 +1301,7 @@
 
 /**
  * Shutdown all peers started in the given group.
- * 
+ *
  * @param pg handle to the peer group
  */
 void





reply via email to

[Prev in Thread] Current Thread [Next in Thread]