This migrates all the client tests that have nothing special in them to the new
test harness.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
When we move on to TAP, stdout will be reserved for TAP and stderr is for free
chatter. Set up an example that tests should use testlog() instead of fprintf
or printf to chat in the right place.
Most statements were already printing to stderr, so this just makes then a
little shorter. There are also some statements that printed to stdout and are
now corrected.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com>
Reviewed-by: Jan Arne Petersen <janarne@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
A more descriptive name to not be confused with create_client().
v2: Rebased: fix also devices-test.c.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
wayland-test isn't and will never be wayland protocol, it's weston internal.
Renamed wayland-test to weston-test, and wl_test to weston_test.
Also added a Big Fat Warning to the description of weston_test to try to
keep people from thinking it's a good idea to use some of these functions
outside of testing.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Acked-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Mostly remove headers that aren't actually needed for anything.
Add stdint.h to permit dropping xf86drm.h, which is otherwise unneeded.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Acked-by: Marek Chalupa <mchqwerty@gmail.com>
Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
There was an issue recently in screen-share.c where config.h was not
being included, resulting in the wrong definition for off_t being used on
32 bit systems. I checked and I don't think this problem is happening
elsewhere, but to help avoid this sort of problem in the future, I went
through and made sure that config.h is included first whenever system
headers are included.
The config.h header should be included before any system headers, failing
to do this can result in the wrong type sizes being defined on certain
systems, e.g. off_t from sys/types.h
Signed-off-by: Andrew Wedgbury <andrew.wedgbury@realvnc.com>
All the libexec programs are only built when BUILD_CLIENTS is true,
so we can just assign libexec_PROGRAMS under the condition. This lets us
drop most of the variable assignments and simplify it a bit.
https://bugs.freedesktop.org/show_bug.cgi?id=72812
Add a macro that wraps wl_display_roundtrip() and check for errors. It
is a macro, so that the assert would show the relevant file and line
number.
This will also catch protocol errors, that would go unnoticed otherwise.
All roundtrips in tests are replaced with the check.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Also make all the callers of weston_surface_assign_output() update the
transform instead. This makes sure that when the surface is assigned an
output its bouding box is valid.
This fixes a bug where a newly created surface would have a NULL output
assigned. This would cause weston_surface_schedule_repaint() to not
schedule a repaint, preventing the surface to be shown until something
else caused a repaint.
Remove the wl_surface argument from create_text_model request. The
wl_surface is specified as an argument in the activate request instead.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>