[tracker] tests: Make libtracker-data tests use separate directories
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tests: Make libtracker-data tests use separate directories
- Date: Sat, 7 Oct 2017 21:15:28 +0000 (UTC)
commit 2d5b6e219897d04e460ca7e341fd1334acd913bd
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Sep 30 22:35:12 2017 +0200
tests: Make libtracker-data tests use separate directories
Those may run in parallel, which is troublesome if all of them try to
remove the test directory after all tests are run.
tests/libtracker-data/tracker-backup-test.c | 5 ++++-
tests/libtracker-data/tracker-ontology-test.c | 2 +-
tests/libtracker-data/tracker-sparql-test.c | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/tests/libtracker-data/tracker-backup-test.c b/tests/libtracker-data/tracker-backup-test.c
index cd07441..1714f58 100644
--- a/tests/libtracker-data/tracker-backup-test.c
+++ b/tests/libtracker-data/tracker-backup-test.c
@@ -267,7 +267,7 @@ main (int argc, char **argv)
setlocale (LC_COLLATE, "en_US.utf8");
current_dir = g_get_current_dir ();
- tests_data_dir = g_build_path (G_DIR_SEPARATOR_S, current_dir, "test-data", NULL);
+ tests_data_dir = g_build_path (G_DIR_SEPARATOR_S, current_dir, "backup-test-data", NULL);
g_free (current_dir);
g_test_init (&argc, &argv, NULL);
@@ -277,5 +277,8 @@ main (int argc, char **argv)
result = g_test_run ();
+ g_assert_cmpint (g_remove (tests_data_dir), ==, 0);
+ g_free (tests_data_dir);
+
return result;
}
diff --git a/tests/libtracker-data/tracker-ontology-test.c b/tests/libtracker-data/tracker-ontology-test.c
index 9e9f311..4b17e67 100644
--- a/tests/libtracker-data/tracker-ontology-test.c
+++ b/tests/libtracker-data/tracker-ontology-test.c
@@ -315,7 +315,7 @@ main (int argc, char **argv)
setlocale (LC_COLLATE, "en_US.utf8");
current_dir = g_get_current_dir ();
- tests_data_dir = g_build_path (G_DIR_SEPARATOR_S, current_dir, "test-data", NULL);
+ tests_data_dir = g_build_path (G_DIR_SEPARATOR_S, current_dir, "ontology-test-data", NULL);
g_free (current_dir);
g_test_init (&argc, &argv, NULL);
diff --git a/tests/libtracker-data/tracker-sparql-test.c b/tests/libtracker-data/tracker-sparql-test.c
index cf5da81..3b16cca 100644
--- a/tests/libtracker-data/tracker-sparql-test.c
+++ b/tests/libtracker-data/tracker-sparql-test.c
@@ -395,7 +395,7 @@ main (int argc, char **argv)
setlocale (LC_COLLATE, "en_US.utf8");
current_dir = g_get_current_dir ();
- tests_data_dir = g_build_path (G_DIR_SEPARATOR_S, current_dir, "test-data", NULL);
+ tests_data_dir = g_build_path (G_DIR_SEPARATOR_S, current_dir, "sparql-test-data", NULL);
g_free (current_dir);
g_test_init (&argc, &argv, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]