From 409f9734297be250de5e462e2d52e653bd893125 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 8 May 2007 14:18:42 -0400 Subject: [PATCH] [test] If a test target fails, end the test otherwise cairo is left in a dirty state and further tests are unreliable. --- test/cairo-test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/cairo-test.c b/test/cairo-test.c index 3a9205021..500bb1623 100755 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -458,9 +458,11 @@ cairo_test_expecting (cairo_test_t *test, * -> FAILURE * else (== some backend SUCCESS) * -> SUCCESS + * + * Also, on a crash, run no further tests. */ - ret = CAIRO_TEST_UNTESTED; - for (i = 0; i < num_targets; i++) { + status = ret = CAIRO_TEST_UNTESTED; + for (i = 0; i < num_targets && status != CAIRO_TEST_CRASHED; i++) { for (j = 0; j < NUM_DEVICE_OFFSETS; j++) { cairo_boilerplate_target_t * volatile target = targets_to_test[i]; volatile int dev_offset = j * 25;