gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r30034 - in gnunet/src: include testing


From: gnunet
Subject: [GNUnet-SVN] r30034 - in gnunet/src: include testing
Date: Wed, 9 Oct 2013 11:51:46 +0200

Author: harsha
Date: 2013-10-09 11:51:46 +0200 (Wed, 09 Oct 2013)
New Revision: 30034

Modified:
   gnunet/src/include/gnunet_testing_lib.h
   gnunet/src/testing/testing.c
Log:
- prefix env variable for specifying the tmp dir testbed/testing uses for 
dumping generated peer config files


Modified: gnunet/src/include/gnunet_testing_lib.h
===================================================================
--- gnunet/src/include/gnunet_testing_lib.h     2013-10-09 09:08:03 UTC (rev 
30033)
+++ gnunet/src/include/gnunet_testing_lib.h     2013-10-09 09:51:46 UTC (rev 
30034)
@@ -93,7 +93,8 @@
  *
  * @param testdir only the directory name without any path. This is used for 
all
  *          service homes; the directory will be created in a temporary 
location
- *          depending on the underlying OS
+ *          depending on the underlying OS.  This variable will be
+ *          overridden with the value of the environmental variable
  * @param trusted_ip the ip address which will be set as TRUSTED HOST in all
  *          service configurations generated to allow control connections from
  *          this ip. This can either be a single ip address or a network 
address
@@ -121,7 +122,8 @@
  *
  * @param testdir only the directory name without any path. This is used for
  *          all service homes; the directory will be created in a temporary
- *          location depending on the underlying OS
+ *          location depending on the underlying OS.  This variable will be
+ *          overridden with the value of the environmental variable
  * @param trusted_ip the ip address which will be set as TRUSTED HOST in all
  *          service configurations generated to allow control connections from
  *          this ip. This can either be a single ip address or a network 
address

Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c        2013-10-09 09:08:03 UTC (rev 30033)
+++ gnunet/src/testing/testing.c        2013-10-09 09:51:46 UTC (rev 30034)
@@ -355,7 +355,9 @@
  *
  * @param testdir only the directory name without any path. This is used for
  *          all service homes; the directory will be created in a temporary
- *          location depending on the underlying OS
+ *          location depending on the underlying OS.  This variable will be
+ *          overridden with the value of the environmental variable
+ *          GNUNET_TESTING_PREFIX, if it exists.
  * @param trusted_ip the ip address which will be set as TRUSTED HOST in all
  *          service configurations generated to allow control connections from
  *          this ip. This can either be a single ip address or a network 
address
@@ -385,7 +387,10 @@
 
   GNUNET_assert (NULL != testdir);
   system = GNUNET_malloc (sizeof (struct GNUNET_TESTING_System));
-  system->tmppath = GNUNET_DISK_mkdtemp (testdir);
+  if (NULL != (system->tmppath = getenv ("GNUNET_TESTING_PREFIX")))
+    system->tmppath = GNUNET_DISK_mkdtemp (testdir);
+  else
+    system->tmppath = GNUNET_strdup (system->tmppath);
   system->lowport = lowport;
   system->highport = highport;
   if (NULL == system->tmppath)




reply via email to

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