[librsvg] set correct fixture path.
- From: Hiroyuki Ikezoe <hiikezoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] set correct fixture path.
- Date: Sat, 1 May 2010 01:24:39 +0000 (UTC)
commit 65c43f4772ec16e3f984abe80b05aad6f097cc9a
Author: Hiroyuki Ikezoe <hiikezoe gnome org>
Date: Sat May 1 10:24:19 2010 +0900
set correct fixture path.
tests/Makefile.am | 2 ++
tests/test-utils.c | 20 ++++----------------
2 files changed, 6 insertions(+), 16 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 81e7af1..87f388b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -16,6 +16,8 @@ INCLUDES = -I$(srcdir) \
-I$(top_srcdir) \
-I$(srcdir)/pdiff \
-DTEST_DATA_DIR="\"$(srcdir)\"" \
+ -DTEST_SRC_DIR="\"$(PWD)\"" \
+ -DTOP_SRC_DIR="\"$(top_srcdir)\"" \
$(LIBRSVG_CFLAGS)
EXTRA_PROGRAMS = $(TESTS)
diff --git a/tests/test-utils.c b/tests/test-utils.c
index b1055ae..7954da6 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.c
@@ -8,25 +8,13 @@ static gchar *data_path = NULL;
const gchar *
test_utils_get_test_data_path (void)
{
- gchar *prgname;
- gchar *dirname;
-
if (data_path)
return data_path;
- prgname = g_get_prgname ();
- dirname = g_path_get_dirname (prgname);
-
-#ifdef LT_OBJDIR
- {
- gchar *another_dirname;
- another_dirname = g_path_get_dirname (dirname);
- g_free (dirname);
- dirname = another_dirname;
- }
-#endif
- data_path = g_build_filename (dirname, "fixtures", NULL);
- g_free (dirname);
+ data_path = g_build_filename (TEST_SRC_DIR,
+ TOP_SRC_DIR,
+ "tests",
+ "fixtures", NULL);
return data_path;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]