[cairo-commit] cairo/test cairo-test.c, 1.32, 1.33 pdf-surface.c,
1.4, 1.5 xlib-surface.c, 1.1, 1.2
Carl Worth
commit at pdx.freedesktop.org
Sat May 14 13:52:02 PDT 2005
Committed by: cworth
Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv21782/test
Modified Files:
cairo-test.c pdf-surface.c xlib-surface.c
Log Message:
* test/cairo-test.c: (cairo_test_real):
* test/pdf-surface.c: (main):
* test/xlib-surface.c: (do_test), (main): Cleanup output a bit,
move verbose messages to test-specific log file.
Index: cairo-test.c
===================================================================
RCS file: /cvs/cairo/cairo/test/cairo-test.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- cairo-test.c 14 May 2005 00:54:43 -0000 1.32
+++ cairo-test.c 14 May 2005 20:51:59 -0000 1.33
@@ -1,5 +1,5 @@
/*
- * Copyright © 2004 Red Hat, Inc.
+ * Copyright © 2004 Red Hat, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
@@ -368,6 +368,10 @@
xunlink (log_name);
cairo_test_log_file = fopen (log_name, "a");
+ if (cairo_test_log_file == NULL) {
+ fprintf (stderr, "Error opening log file: %s\n", log_name);
+ cairo_test_log_file = stderr;
+ }
ret = CAIRO_TEST_SUCCESS;
for (i=0; i < sizeof(targets)/sizeof(targets[0]); i++) {
Index: pdf-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/test/pdf-surface.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- pdf-surface.c 14 May 2005 17:00:27 -0000 1.4
+++ pdf-surface.c 14 May 2005 20:51:59 -0000 1.5
@@ -39,6 +39,7 @@
FILE *file;
cairo_surface_t *surface;
+ printf("\n");
file = fopen (filename, "w");
if (!file) {
cairo_test_log ("Failed to open file %s\n", filename);
Index: xlib-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/test/xlib-surface.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xlib-surface.c 14 May 2005 00:54:43 -0000 1.1
+++ xlib-surface.c 14 May 2005 20:51:59 -0000 1.2
@@ -33,9 +33,9 @@
#define SIZE 100
#define OFFSCREEN_OFFSET 50
-#define VERBOSE 0
cairo_bool_t result = 0;
+FILE *log_file = NULL;
static void
draw_pattern (cairo_surface_t *surface)
@@ -166,16 +166,14 @@
4 * SIZE);
}
- if (VERBOSE || !result) {
- fprintf (stderr, "xlib-surface: %s, %s, %s%s: %s\n",
- use_render ? " render" : "no-render",
- set_size ? " size" : "no-size",
- use_pixmap ? "pixmap" : "window",
- use_pixmap ?
- " " :
- (offscreen ? ", offscreen" : ", onscreen"),
- result ? "PASS" : "FAIL");
- }
+ fprintf (log_file, "xlib-surface: %s, %s, %s%s: %s\n",
+ use_render ? " render" : "no-render",
+ set_size ? " size" : "no-size",
+ use_pixmap ? "pixmap" : "window",
+ use_pixmap ?
+ " " :
+ (offscreen ? ", offscreen" : ", onscreen"),
+ result ? "PASS" : "FAIL");
return result;
}
@@ -209,14 +207,21 @@
cairo_bool_t offscreen;
result = 0;
+ printf("\n");
+ log_file = fopen ("xlib-surface.log", "w");
+ if (log_file == NULL) {
+ fprintf (stderr, "Error opening log file: %s\n", "xlib-surface.log");
+ log_file = stderr;
+ }
+
dpy = XOpenDisplay (NULL);
if (!dpy) {
- fprintf (stderr, "xlib-surface: Cannot open display, skipping\n");
+ fprintf (log_file, "xlib-surface: Cannot open display, skipping\n");
return 0;
}
if (!check_visual (dpy)) {
- fprintf (stderr, "xlib-surface: default visual is not RGB24 or BGR24, skipping\n");
+ fprintf (log_file, "xlib-surface: default visual is not RGB24 or BGR24, skipping\n");
return 0;
}
More information about the cairo-commit
mailing list