summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPhilip Chimento <philip@endlessm.com>2013-10-09 10:46:40 -0700
committerPhilip Chimento <philip@endlessm.com>2013-10-09 10:59:46 -0700
commit71eaf58db28a7276703640f5c330ae94191018b7 (patch)
tree1bfe49638892cf6a302d3edfa4b11ceadaf0152d /test
parent2a489e1da5f625814868b0275ecc57edcbd3889e (diff)
Identify app ID for tests with getpid()
In order to prevent collisions between configuration directories, the test applications get unique IDs from not just g_get_real_time(), but also getpid()
Diffstat (limited to 'test')
-rw-r--r--test/run-tests.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/run-tests.c b/test/run-tests.c
index 016744d..db9c289 100644
--- a/test/run-tests.c
+++ b/test/run-tests.c
@@ -1,6 +1,7 @@
/* Copyright 2013 Endless Mobile, Inc. */
#include <inttypes.h> /* For PRIi64 */
+#include <unistd.h> /* For getpid() */
#include <glib-object.h>
#include <glib.h>
#include <gtk/gtk.h>
@@ -14,9 +15,10 @@
gchar *
generate_unique_app_id (void)
{
- return g_strdup_printf ("%s%" PRIi64,
+ return g_strdup_printf ("%s%" PRIi64 "%ld",
APPLICATION_TEST_ID_BASE,
- g_get_real_time ());
+ g_get_real_time (),
+ (long) getpid ());
}
/* Test fixture for running a test from an EosApplication's "startup" handler */