[cairo-commit]
cairo/test Makefile.am, 1.17, 1.18 cairo_test.c, 1.9, 1.10
Carl Worth
commit at pdx.freedesktop.org
Tue Mar 8 19:25:41 PST 2005
Committed by: cworth
Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv31525/test
Modified Files:
Makefile.am cairo_test.c
Log Message:
* test/cairo_test.c (cairo_test_create_png_pattern): Look for png
images in ${srcdir}/filename as well, so that make distcheck can
still find them.
* test/Makefile.am (EXTRA_DIST): Add romedalen.png to EXTRA_DIST
so the tests can pass from the tar file.
* doc/public/cairo-sections.txt: Fix typo: cairo-win3 ->
cairo-win32.
* doc/public/cairo-docs.xml: Add cairo-win32.xml to the list, so
it gets generated as well.
* NEWS (http): Add pointer to new win32 documentation.
Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo/test/Makefile.am,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- Makefile.am 8 Mar 2005 21:44:15 -0000 1.17
+++ Makefile.am 9 Mar 2005 03:25:39 -0000 1.18
@@ -22,7 +22,8 @@
move_to_show_surface-ref.png \
coverage-ref.png \
clip_twice-ref.png \
-pixman_rotate-ref.png
+pixman_rotate-ref.png \
+romedalen.png
# Once we can draw the text_rotate.c test case correctly, we should
# create and add text_rotate-ref.png to the list of reference PNGs.
Index: cairo_test.c
===================================================================
RCS file: /cvs/cairo/cairo/test/cairo_test.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- cairo_test.c 8 Mar 2005 21:44:15 -0000 1.9
+++ cairo_test.c 9 Mar 2005 03:25:39 -0000 1.10
@@ -222,8 +222,17 @@
unsigned char *buffer;
int w, h, stride;
read_png_status_t status;
+ char *srcdir = getenv ("srcdir");
status = read_png_argb32 (filename, &buffer, &w,&h, &stride);
+ if (status != READ_PNG_SUCCESS) {
+ if (srcdir) {
+ char *srcdir_filename;
+ xasprintf (&srcdir_filename, "%s/%s", srcdir, filename);
+ status = read_png_argb32 (srcdir_filename, &buffer, &w,&h, &stride);
+ free (srcdir_filename);
+ }
+ }
if (status != READ_PNG_SUCCESS)
return NULL;
More information about the cairo-commit
mailing list