[tracker] Distcheck fix: set XDG_CACHE_HOME to some dir that can be rm'ed afterwards.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Distcheck fix: set XDG_CACHE_HOME to some dir that can be rm'ed afterwards.
- Date: Thu, 25 Mar 2010 17:03:36 +0000 (UTC)
commit bff872dca5282152bf71dc5aa9ec6d14c0ef2d01
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Mar 25 17:29:34 2010 +0100
Distcheck fix: set XDG_CACHE_HOME to some dir that can be rm'ed afterwards.
tests/libtracker-data/tracker-ontology-test.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/tests/libtracker-data/tracker-ontology-test.c b/tests/libtracker-data/tracker-ontology-test.c
index 1be4ffa..7794e15 100644
--- a/tests/libtracker-data/tracker-ontology-test.c
+++ b/tests/libtracker-data/tracker-ontology-test.c
@@ -394,7 +394,7 @@ main (int argc, char **argv)
{
gint result;
gint i;
- gchar *current_dir;
+ gchar *data_dir;
g_type_init ();
@@ -404,10 +404,10 @@ main (int argc, char **argv)
g_test_init (&argc, &argv, NULL);
- current_dir = g_get_current_dir ();
+ data_dir = g_build_filename (g_get_current_dir (), "test-cache", NULL);
- g_setenv ("XDG_DATA_HOME", current_dir, TRUE);
- g_setenv ("XDG_CACHE_HOME", current_dir, TRUE);
+ g_setenv ("XDG_DATA_HOME", data_dir, TRUE);
+ g_setenv ("XDG_CACHE_HOME", data_dir, TRUE);
g_setenv ("TRACKER_DB_SQL_DIR", TOP_SRCDIR "/data/db/", TRUE);
g_setenv ("TRACKER_DB_ONTOLOGIES_DIR", TOP_SRCDIR "/data/ontologies/", TRUE);
@@ -444,6 +444,9 @@ main (int argc, char **argv)
/* clean up */
g_print ("Removing temporary data\n");
g_spawn_command_line_async ("rm -R tracker/", NULL);
+ g_spawn_command_line_async ("rm -R test-cache/", NULL);
+
+ g_free (data_dir);
return result;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]