summaryrefslogtreecommitdiff
path: root/perf/cairo-perf.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2006-10-04 16:35:20 -0700
committerCarl Worth <cworth@cworth.org>2006-10-04 17:14:12 -0700
commitbda77f505c911aea8ce684cb22a1469d1b7a9049 (patch)
tree720f195f2dffbc101d81ab65a6c5502bbedf6350 /perf/cairo-perf.c
parentd15b8f2d6e0b0c2279fb0b17368f1110396e4bf8 (diff)
perf: Bail if cairo_status returns non-success at the end of a test.
Diffstat (limited to 'perf/cairo-perf.c')
-rw-r--r--perf/cairo-perf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/perf/cairo-perf.c b/perf/cairo-perf.c
index 8e630afca..e54e8fbbc 100644
--- a/perf/cairo-perf.c
+++ b/perf/cairo-perf.c
@@ -214,8 +214,16 @@ main (int argc, char *argv[])
target->closure);
perf.cr = cairo_create (surface);
+
perf_case->run (&perf, perf.cr, perf.size, perf.size);
+ if (cairo_status (perf.cr)) {
+ fprintf (stderr, "Error: Test left cairo in an error state: %s\n",
+ cairo_status_to_string (cairo_status (perf.cr)));
+ exit (1);
+ }
+
+ cairo_destroy (perf.cr);
cairo_surface_destroy (surface);
}
}