Add a status return value to every test definition. There are no
behavioral changes, previously the RESULT_OK was simply assumed.
The benefit of this is that in the future individual tests can also
return RESULT_SKIP, so that we can keep statistics of skipped tests.
ivi-layout-internal-test.c has the only case where a test function may
return early. That one is set to return RESULT_HARD_ERROR to match the
compositor exit code already there.
Also documentation is updated.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This converts weston_matrix and weston_vector to use linalg-types
internally. All direct accesses to members had to be converted
everywhere, mostly in the simplest form possible which leaves some
trivially reducable code around.
The intention is that we can now gradually migrate away from
weston_matrix in the future.
Look like one trailing space got accidentally annihilated in
compositor.c.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit gets rid of libc's abort() usage in the test suite using
test asserts instead.
Asserts run in the server as plugins aren't converted because they are
shared between server and client.
Co-authored-by: Daniel Stone <daniels@collabora.com>
Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
We're pushing more and more mutable state into paint nodes, but this state
has a non-zero cost to rebuild every render.
Let's take care to track when we need to rebuild the state.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Add an output transform function that doesn't use matrices so we can
test our matrix generation by applying it to vectors and comparing with
the non-matrix variant.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Add tests to validate that weston_matrix_to_transform() works properly
on the matrices generated by weston_surface_build_buffer_matrix() and
weston_output_update_matrix()
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
When we build up a matrix from a series of operations, it's very useful
to know if the combined operations still result in something that matches
a wl_output_transform.
This adds a function to test if a matrix leads to a standard output
transform, and returns the transform if it does.
Tests are provided that check if complex series of operations return
expected results - the weston_matrix_needs_filtering function is tested
at the same time.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>