[gegl] Make test-roundtrip.c support make distcheck



commit 1be4342259c93350b6ab99c637e38c884074ccd1
Author: Martin Nordholts <martinn src gnome org>
Date:   Wed Nov 23 06:56:34 2011 +0100

    Make test-roundtrip.c support make distcheck
    
    Distribute files the test depend on and don't assume builddir =
    srcdir.

 configure.ac               |    1 +
 tests/xml/Makefile.am      |    2 ++
 tests/xml/data/Makefile.am |    3 +++
 tests/xml/test-roundtrip.c |    4 +++-
 4 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0557049..717d79d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1099,6 +1099,7 @@ tests/compositions/data/Makefile
 tests/python/Makefile
 tests/simple/Makefile
 tests/xml/Makefile
+tests/xml/data/Makefile
 gegl.pc
 gegl-uninstalled.pc
 ])
diff --git a/tests/xml/Makefile.am b/tests/xml/Makefile.am
index 76d4bde..a7342aa 100644
--- a/tests/xml/Makefile.am
+++ b/tests/xml/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS = data
+
 # Make the tests run against the build and not the installation
 TESTS_ENVIRONMENT = \
 	GEGL_PATH=$(top_builddir)/operations/common:$(top_builddir)/operations/core:$(top_builddir)/operations/external:$(top_builddir)/operations/affine:$(top_builddir)/operations/generated \
diff --git a/tests/xml/data/Makefile.am b/tests/xml/data/Makefile.am
new file mode 100644
index 0000000..c543a82
--- /dev/null
+++ b/tests/xml/data/Makefile.am
@@ -0,0 +1,3 @@
+EXTRA_DIST = \
+	hdr-color.xml \
+	rgb-params.xml
diff --git a/tests/xml/test-roundtrip.c b/tests/xml/test-roundtrip.c
index efed6fa..91c0f9a 100644
--- a/tests/xml/test-roundtrip.c
+++ b/tests/xml/test-roundtrip.c
@@ -113,11 +113,13 @@ int
 main (int argc, char *argv[])
 {
     int result = -1;
+    gchar *datadir;
 
     gegl_init(&argc, &argv);
     g_test_init(&argc, &argv, NULL);
 
-    if (!add_tests_for_xml_files_in_directory("data")) {
+    datadir = g_build_filename (g_getenv ("ABS_TOP_SRCDIR"), "tests/xml/data", NULL);
+    if (!add_tests_for_xml_files_in_directory(datadir)) {
         result = -1;
     }
     else {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]