diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-10-09 09:51:46 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-10-09 09:51:46 +0000 |
commit | f1a2ee6e906e8855a7faf0f2df5c6ccb71c13e21 (patch) | |
tree | 8deca5a0fcf81560b99faffc3631f1ae5723b8bc | |
parent | 3e1aab2cd192e4f8d3853b2841254080359e3c12 (diff) | |
download | gnunet-f1a2ee6e906e8855a7faf0f2df5c6ccb71c13e21.tar.gz gnunet-f1a2ee6e906e8855a7faf0f2df5c6ccb71c13e21.zip |
- prefix env variable for specifying the tmp dir testbed/testing uses for dumping generated peer config files
-rw-r--r-- | src/include/gnunet_testing_lib.h | 6 | ||||
-rw-r--r-- | src/testing/testing.c | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h index 3f5b260eb..100f56ed5 100644 --- a/src/include/gnunet_testing_lib.h +++ b/src/include/gnunet_testing_lib.h | |||
@@ -93,7 +93,8 @@ struct GNUNET_TESTING_SharedService | |||
93 | * | 93 | * |
94 | * @param testdir only the directory name without any path. This is used for all | 94 | * @param testdir only the directory name without any path. This is used for all |
95 | * service homes; the directory will be created in a temporary location | 95 | * service homes; the directory will be created in a temporary location |
96 | * depending on the underlying OS | 96 | * depending on the underlying OS. This variable will be |
97 | * overridden with the value of the environmental variable | ||
97 | * @param trusted_ip the ip address which will be set as TRUSTED HOST in all | 98 | * @param trusted_ip the ip address which will be set as TRUSTED HOST in all |
98 | * service configurations generated to allow control connections from | 99 | * service configurations generated to allow control connections from |
99 | * this ip. This can either be a single ip address or a network address | 100 | * this ip. This can either be a single ip address or a network address |
@@ -121,7 +122,8 @@ GNUNET_TESTING_system_create (const char *testdir, | |||
121 | * | 122 | * |
122 | * @param testdir only the directory name without any path. This is used for | 123 | * @param testdir only the directory name without any path. This is used for |
123 | * all service homes; the directory will be created in a temporary | 124 | * all service homes; the directory will be created in a temporary |
124 | * location depending on the underlying OS | 125 | * location depending on the underlying OS. This variable will be |
126 | * overridden with the value of the environmental variable | ||
125 | * @param trusted_ip the ip address which will be set as TRUSTED HOST in all | 127 | * @param trusted_ip the ip address which will be set as TRUSTED HOST in all |
126 | * service configurations generated to allow control connections from | 128 | * service configurations generated to allow control connections from |
127 | * this ip. This can either be a single ip address or a network address | 129 | * this ip. This can either be a single ip address or a network address |
diff --git a/src/testing/testing.c b/src/testing/testing.c index 600c53c1a..852bae567 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -355,7 +355,9 @@ cfg_copy_iterator (void *cls, const char *section, | |||
355 | * | 355 | * |
356 | * @param testdir only the directory name without any path. This is used for | 356 | * @param testdir only the directory name without any path. This is used for |
357 | * all service homes; the directory will be created in a temporary | 357 | * all service homes; the directory will be created in a temporary |
358 | * location depending on the underlying OS | 358 | * location depending on the underlying OS. This variable will be |
359 | * overridden with the value of the environmental variable | ||
360 | * GNUNET_TESTING_PREFIX, if it exists. | ||
359 | * @param trusted_ip the ip address which will be set as TRUSTED HOST in all | 361 | * @param trusted_ip the ip address which will be set as TRUSTED HOST in all |
360 | * service configurations generated to allow control connections from | 362 | * service configurations generated to allow control connections from |
361 | * this ip. This can either be a single ip address or a network address | 363 | * this ip. This can either be a single ip address or a network address |
@@ -385,7 +387,10 @@ GNUNET_TESTING_system_create_with_portrange (const char *testdir, | |||
385 | 387 | ||
386 | GNUNET_assert (NULL != testdir); | 388 | GNUNET_assert (NULL != testdir); |
387 | system = GNUNET_malloc (sizeof (struct GNUNET_TESTING_System)); | 389 | system = GNUNET_malloc (sizeof (struct GNUNET_TESTING_System)); |
388 | system->tmppath = GNUNET_DISK_mkdtemp (testdir); | 390 | if (NULL != (system->tmppath = getenv ("GNUNET_TESTING_PREFIX"))) |
391 | system->tmppath = GNUNET_DISK_mkdtemp (testdir); | ||
392 | else | ||
393 | system->tmppath = GNUNET_strdup (system->tmppath); | ||
389 | system->lowport = lowport; | 394 | system->lowport = lowport; |
390 | system->highport = highport; | 395 | system->highport = highport; |
391 | if (NULL == system->tmppath) | 396 | if (NULL == system->tmppath) |