summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-01-23 16:27:21 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-01-23 16:27:21 +0000
commit8b728035f9cfe490ba109494eb8564d11552e374 (patch)
tree2cc04257fd0293666366d066fc5edac2fa382474 /tests
parentce22d934fce30c8fce9b660221419f8a0055d565 (diff)
downloadpango-8b728035f9cfe490ba109494eb8564d11552e374.tar.gz
Make tests/examples do use generated pango.modules. (bug #328291)
2006-01-23 Behdad Esfahbod <behdad@gnome.org> Make tests/examples do use generated pango.modules. (bug #328291) * examples/pangorc, tests/pangorc: Removed. Moved to modules/. * examples/pangox.aliases: Removed. Moved to pango/. * examples/Makefile.am, tests/Makefile.am: Remove pango.modules creation stuff, copy pangorc from $(srcdir)/../modules/pangorc insteadd. * examples/renderdemo.c: Add --pangorc option, default to ./pangorc. Setenv PANGO_RC_FILE to whatever pangorc file decided. * tests/*.c: Setenv PANGO_RC_FILE to ./pangorc. * pango/pangox.aliases: Added. * pango/Makefile.am: Install pangox.aliases. * modules/pangorc: Added. * modules/Makefile.am: Create pango.modules. Added pangorc. * modules/.cvsignore, examples/.cvsignore, tests/.cvsignore: Updated.
Diffstat (limited to 'tests')
-rw-r--r--tests/.cvsignore2
-rw-r--r--tests/Makefile.am35
-rw-r--r--tests/dump-boundaries.c2
-rw-r--r--tests/pangorc7
-rw-r--r--tests/testboundaries.c2
-rw-r--r--tests/testcolor.c2
-rw-r--r--tests/testiter.c2
-rw-r--r--tests/testscript.c2
8 files changed, 23 insertions, 31 deletions
diff --git a/tests/.cvsignore b/tests/.cvsignore
index 0202c46d..c462db74 100644
--- a/tests/.cvsignore
+++ b/tests/.cvsignore
@@ -12,4 +12,4 @@ cxx-test
testcolor
Makefile.in
Makefile
-pango.modules
+pangorc
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e407b57f..d46b8469 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,13 @@
## Process this file with automake to create Makefile.in.
+EXTRA_DIST = \
+ all-unicode.txt \
+ boundaries.utf8 \
+ runtests.sh
+
+CLEANFILES = pangorc
+DISTCLEANFILES = all-unicode.txt runtests.log
+
INCLUDES = \
-DG_DISABLE_DEPRECATED \
-I$(top_srcdir) \
@@ -68,29 +76,10 @@ check_PROGRAMS += cxx-test
endif
cxx_test_SOURCES = cxx-test.C
-if CROSS_COMPILING
-all-local:
-else
-all-local: all-unicode.txt pango.modules
-endif
-
-pango.modules:
- if find ../modules -name '*.so' | grep 'so' > /dev/null ; then \
- echo "Writing a pango.modules file to use when running tests before installing Pango."; \
- (cd ../modules && \
- ../pango/pango-querymodules `find . -name '*.la' | grep -v \.libs` > ../tests/pango.modules ) ;\
- else \
- echo "No dynamic modules found; will use only static modules for uninstalled test programs."; \
- touch pango.modules; \
- fi
-
-EXTRA_DIST = \
- all-unicode.txt \
- boundaries.utf8 \
- runtests.sh
-
all-unicode.txt: gen-all-unicode
./gen-all-unicode > all-unicode.txt
-CLEANFILES = pango.modules
-DISTCLEANFILES = all-unicode.txt runtests.log
+pangorc: $(srcdir)/../modules/pangorc
+ cp $< $@
+
+$(noinst_PROGRAMS) $(check_PROGRAMS): pangorc
diff --git a/tests/dump-boundaries.c b/tests/dump-boundaries.c
index f566a54c..29efc522 100644
--- a/tests/dump-boundaries.c
+++ b/tests/dump-boundaries.c
@@ -113,6 +113,8 @@ main (int argc,
{
gchar *text;
+ g_setenv ("PANGO_RC_FILE", "./pangorc", TRUE);
+
if (argc < 2)
fail ("must give a filename on the command line");
diff --git a/tests/pangorc b/tests/pangorc
deleted file mode 100644
index 2004c977..00000000
--- a/tests/pangorc
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# pangorc file for uninstalled operation.
-#
-
-[Pango]
-ModuleFiles = ./pango.modules
-
diff --git a/tests/testboundaries.c b/tests/testboundaries.c
index e003aadb..edc5b184 100644
--- a/tests/testboundaries.c
+++ b/tests/testboundaries.c
@@ -340,6 +340,8 @@ main (int argc, char *argv[])
const gchar *srcdir;
const gchar *filename;
+ g_setenv ("PANGO_RC_FILE", "./pangorc", TRUE);
+
srcdir = getenv ("srcdir");
if (!srcdir)
srcdir = ".";
diff --git a/tests/testcolor.c b/tests/testcolor.c
index d64153d9..068b0d9b 100644
--- a/tests/testcolor.c
+++ b/tests/testcolor.c
@@ -84,6 +84,8 @@ main (int argc, char *argv[])
gboolean success;
ColorSpec *spec;
+ g_setenv ("PANGO_RC_FILE", "./pangorc", TRUE);
+
success = TRUE;
for (spec = specs; spec->spec; spec++)
success &= test_color (spec);
diff --git a/tests/testiter.c b/tests/testiter.c
index 58cc2289..76bb7f1b 100644
--- a/tests/testiter.c
+++ b/tests/testiter.c
@@ -218,6 +218,8 @@ main (int argc, char *argv[])
PangoContext *context;
PangoLayout *layout;
+ g_setenv ("PANGO_RC_FILE", "./pangorc", TRUE);
+
fontmap = pango_cairo_font_map_get_default ();
context = pango_cairo_font_map_create_context (PANGO_CAIRO_FONT_MAP (fontmap));
diff --git a/tests/testscript.c b/tests/testscript.c
index 4594a9a9..79c8471c 100644
--- a/tests/testscript.c
+++ b/tests/testscript.c
@@ -248,6 +248,8 @@ test_script_iter (void)
int
main (int argc, char **argv)
{
+ g_setenv ("PANGO_RC_FILE", "./pangorc", TRUE);
+
test_script_lookup ();
test_script_iter ();