diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-09-03 16:38:03 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-31 12:30:11 +0000 |
commit | e90073f7ddc6f461a935bc360c409b04f1fe9f74 (patch) | |
tree | efda94d1ecd13143cdad23f14552661165e7601e /test/text-cache-crash.c | |
parent | 8457972d40088cda165f31fdd7bd9b4c19c6e095 (diff) | |
download | cairo-e90073f7ddc6f461a935bc360c409b04f1fe9f74.tar.gz |
[test] Build test suite into single binary.
Avoid calling libtool to link every single test case, by building just one
binary from all the sources.
This binary is then given the task of choosing tests to run (based on user
selection and individual test requirement), forking each test into its own
process and accumulating the results.
Diffstat (limited to 'test/text-cache-crash.c')
-rw-r--r-- | test/text-cache-crash.c | 40 |
1 files changed, 6 insertions, 34 deletions
diff --git a/test/text-cache-crash.c b/test/text-cache-crash.c index b78b3a33c..4786af4d5 100644 --- a/test/text-cache-crash.c +++ b/test/text-cache-crash.c @@ -62,16 +62,6 @@ #include "cairo-test.h" -static cairo_test_draw_function_t draw; - -static const cairo_test_t test = { - "text-cache-crash", - "Test case for bug causing an assertion failure in _cairo_cache_lookup", - 0, 0, - draw -}; -#include <cairo.h> - static cairo_test_status_t draw (cairo_t *cr, int width, int height) { @@ -89,33 +79,15 @@ draw (cairo_t *cr, int width, int height) /* Then there was a bug that choked when selecting a font too big * for the cache. */ -/* XXX: Sometimes this leads to an assertion: - -_cairo_cache_lookup: Assertion `cache->max_memory >= (cache->used_memory + new_entry->memory)' failed. -Aborted - - But other times my machine hangs completely only to return to life - several minutes later with some programs missing. This seems like - the out-of-memory killer to me. - - It seems like I usually get the assertion when I run - ./text_cache_crash directly and I usually get the machine hang when - I run "make check" but I don't know if there's a perfect - correlation there. - - So there's a bad bug here somewhere that really needs to be fixed. - But in the meantime, I need "make check" not to destory work, so - I'm commenting this test out for now. - cairo_set_font_size (cr, 500); cairo_show_text (cr, "hello"); -*/ return CAIRO_TEST_SUCCESS; } -int -main (void) -{ - return cairo_test (&test); -} +CAIRO_TEST (text_cache_crash, + "Test case for bug causing an assertion failure in _cairo_cache_lookup", + "text, stress", /* keywords */ + NULL, /* requirements */ + 0, 0, + NULL, draw) |