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 /src/testing | |
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
Diffstat (limited to 'src/testing')
-rw-r--r-- | src/testing/testing.c | 9 |
1 files changed, 7 insertions, 2 deletions
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) |