[cairo-commit] test/cairo-test.c

Behdad Esfahbod behdad at kemper.freedesktop.org
Tue May 8 11:18:28 PDT 2007


 test/cairo-test.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

New commits:
diff-tree 409f9734297be250de5e462e2d52e653bd893125 (from aad66d05fd0f310564e80c9ff59526028871751c)
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue May 8 14:18:42 2007 -0400

    [test] If a test target fails, end the test
    otherwise cairo is left in a dirty state and further tests are
    unreliable.

diff --git a/test/cairo-test.c b/test/cairo-test.c
index 3a92050..500bb16 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;


More information about the cairo-commit mailing list