[gtk+] tests: Make icontheme test installable



commit f750f70c7dd1f8d01e6bc3fa4363ada1e54acaf9
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed May 21 13:46:49 2014 -0400

    tests: Make icontheme test installable
    
    To make the icontheme test run successfully when installed,
    we need to use the correct test-framework-provided location,
    and we need to install the test theme without stripping its
    subdirectory structure.

 testsuite/gtk/Makefile.am |    2 +-
 testsuite/gtk/icontheme.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/testsuite/gtk/Makefile.am b/testsuite/gtk/Makefile.am
index 615c9fc..10301c6 100644
--- a/testsuite/gtk/Makefile.am
+++ b/testsuite/gtk/Makefile.am
@@ -162,7 +162,7 @@ all-am: gschemas.compiled
 if BUILDOPT_INSTALL_TESTS
 insttestdir = $(pkglibexecdir)/installed-tests
 insttest_PROGRAMS = $(TEST_PROGS)
-insttest_DATA = $(test_icontheme)
+nobase_insttest_DATA = $(test_icontheme)
 
 %.test: %$(EXEEXT) Makefile
        $(AM_V_GEN) (echo '[Test]' > $  tmp; \
diff --git a/testsuite/gtk/icontheme.c b/testsuite/gtk/icontheme.c
index d4f4783..c72d50d 100644
--- a/testsuite/gtk/icontheme.c
+++ b/testsuite/gtk/icontheme.c
@@ -15,7 +15,7 @@ get_test_icontheme (void)
 
   icon_theme = gtk_icon_theme_new ();
   gtk_icon_theme_set_custom_theme (icon_theme, "icons");
-  current_dir = g_get_current_dir ();
+  current_dir = g_test_get_dir (G_TEST_DIST);
   gtk_icon_theme_set_search_path (icon_theme, &current_dir, 1);
 
   return icon_theme;


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