From 253cbbba71629c6144c2440c0ab5f4bde975acc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Mon, 8 Apr 2013 19:36:23 +0200 Subject: Make log-manager tests writable --- tests/dbus/test-tpl-log-store-xml.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'tests/dbus/test-tpl-log-store-xml.c') diff --git a/tests/dbus/test-tpl-log-store-xml.c b/tests/dbus/test-tpl-log-store-xml.c index 35e3178..4351f73 100644 --- a/tests/dbus/test-tpl-log-store-xml.c +++ b/tests/dbus/test-tpl-log-store-xml.c @@ -24,27 +24,6 @@ typedef struct } XmlTestCaseFixture; -static void -copy_dir (const gchar *from_dir, const gchar *to_dir) -{ - gchar *command; - - // If destination directory exist erase it - command = g_strdup_printf ("rm -rf %s", to_dir); - g_assert (system (command) == 0); - g_free (command); - - command = g_strdup_printf ("cp -r %s %s", from_dir, to_dir); - g_assert (system (command) == 0); - g_free (command); - - // In distcheck mode the files and directory are read-only, fix that - command = g_strdup_printf ("chmod -R +w %s", to_dir); - g_assert (system (command) == 0); - g_free (command); -} - - static void setup (XmlTestCaseFixture* fixture, gconstpointer user_data) @@ -81,7 +60,7 @@ setup_for_writing (XmlTestCaseFixture *fixture, writable_dir = g_build_path (G_DIR_SEPARATOR_S, g_get_tmp_dir (), "logger-test-logs", NULL); - copy_dir (readonly_dir, writable_dir); + tp_tests_copy_dir (readonly_dir, writable_dir); fixture->tmp_basedir = writable_dir; g_free (readonly_dir); -- cgit v1.2.1