Commit graph

13 commits

Author SHA1 Message Date
Andrea Canciani
e1353f3b85 test: Always use DejaVu Sans as default font
This makes the results of the test suite more stable across different
environments, because it does not rely anymore on
CAIRO_FONT_FAMILY_DEFAULT (which on Windows is "Arial", on Mac
"Helvetica").

This change should not affect Linux environments, assuming that the
default font is already set to "DejaVu Sans".
2015-07-27 12:45:59 +02:00
Chris Wilson
fb53d05a69 test: Remove pthread_yield()
I accidentally pushed this debugging left-over from when I was tracking
down a race in memfault. Remove it so that the test suite compiles on
more minimal pthread setups.
2010-05-12 20:09:44 +01:00
Chris Wilson
9a0958be01 test: Cleanup after failed pthread_join(). 2010-05-04 13:28:36 +01:00
Chris Wilson
4ee5119a34 test: Expand pthread-show-text to cover all surfaces.
In a similar fashion to pthread-same-source and pthread-similar, check
that the texting handling is thread-safe for all surface and font
backends.
2010-04-30 13:00:05 +01:00
Chris Wilson
e90073f7dd [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.
2008-10-31 12:30:11 +00:00
Behdad Esfahbod
965b0e51ec [test] Do not include "xmalloc.h" directly
Not needed, it's renamed and included by boilerplate directly.
2008-09-04 23:25:27 -04:00
Chris Wilson
436c0c8be2 [test] Preparatory work for running under memfault.
In order to run under memfault, the framework is first extended to handle
running concurrent tests - i.e. multi-threading. (Not that this is a
requirement for memfault, instead it shares a common goal of storing
per-test data).  To that end all the global data is moved into a per-test
context and the targets are adjusted to avoid overlap on shared, global
resources (such as output files and frame buffers). In order to preserve
the simplicity of the standard draw routines, the context is not passed
explicitly as a parameter to the routines, but is instead attached to the
cairo_t via the user_data.

For the masochist, to enable the tests to be run across multiple threads
simply set the environment variable CAIRO_TEST_NUM_THREADS to the desired
number.

In the long run, we can hope the need for memfault (runtime testing of
error paths) will be mitigated by static analysis. A promising candidate
for this task would appear to be http://hal.cs.berkeley.edu/cil/.
2008-08-13 21:54:59 +01:00
Carl Worth
8c579ef835 More tightening of test cleanup to avoid valgrind complaints. 2007-03-02 12:30:14 -08:00
Carl Worth
d6d1767f9a Increase pthread-show-text thread count and add cairo_select_font_face to expose more bugs. 2007-02-13 10:47:06 -08:00
Carl Worth
fc3ce1e80a test/pthread-show-text: Increease iterations to expose locking bug
With 50 iterations I'm seeing the following assertion failure:

cairo-hash.c:477: _cairo_hash_table_insert: Assertion `NOT_REACHED' failed.

Thanks to Jan Slupski <jslupski@juljas.net> for pointing out this bug.
2007-02-06 20:41:58 -08:00
Tim Mooney
b7e9506707 bug #6890: fix the signature for main() in pthread-show-text 2006-05-10 20:51:53 -07:00
Carl Worth
e8708af118 Adjust parameters to stress things a bit more, (better exposing another locking bug). 2005-09-13 12:37:45 +00:00
Carl Worth
258f6f4903 Add documentation for cairo_test functions.
Abstract log fie creation into cairo_test_init for use by tests that don't use cairo_test().
Add new test for bug #4299 as reported by Alexey Shabalin.
2005-09-13 12:11:32 +00:00