From 71eaf58db28a7276703640f5c330ae94191018b7 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Wed, 9 Oct 2013 10:46:40 -0700 Subject: 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() --- test/run-tests.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') 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 /* For PRIi64 */ +#include /* For getpid() */ #include #include #include @@ -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 */ -- cgit v1.2.3