From 43645eb486da1af91b3264af6c84ac18a1eddcaa Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 8 May 2007 20:25:21 +0100 Subject: [PATCH] [test/fallback-resolution] Cleanup after test failure Be valgrind clean even for test failures. --- test/fallback-resolution.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/fallback-resolution.c b/test/fallback-resolution.c index 37fd59199..10ed9646e 100644 --- a/test/fallback-resolution.c +++ b/test/fallback-resolution.c @@ -88,6 +88,7 @@ main (void) cairo_surface_t *surface = NULL; cairo_t *cr; cairo_status_t status; + cairo_test_status_t ret = CAIRO_TEST_SUCCESS; double ppi[] = { 600., 300., 150., 75., 37.5 }; backend_t backend; int page, num_pages; @@ -138,7 +139,8 @@ main (void) cairo_test_log ("Failed to create pdf surface for file %s: %s\n", backend_filename[backend], cairo_status_to_string (status)); - return CAIRO_TEST_FAILURE; + ret = CAIRO_TEST_FAILURE; + break; } printf ("fallback-resolution: Please check %s to ensure it looks correct.\n", @@ -147,5 +149,5 @@ main (void) cairo_test_fini (); - return CAIRO_TEST_SUCCESS; + return ret; }