aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/testing.c')
-rw-r--r--src/testing/testing.c9
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)