Commit Graph

24 Commits

Author SHA1 Message Date
Loïc Molinari
343adb2acd tests: Speed up runtime using immediate repaint on capture
The test suite is throttled by the headless backend repaint
timer. This commit uses the headless refresh rate option to speed up
runtime by using the immediate repaint-only-on-capture mode by
default. Tests which don't support that mode yet override the refresh
value to use the highest rate possible.

Fixes #682

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
2024-02-22 14:26:32 +00:00
Daniel Stone
1b837b6ff3 tests: Explicitly use desktop-shell for text-test
text-test wants to use the real desktop-shell so it can launch the input
method.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2022-11-04 10:24:42 +00:00
Pekka Paalanen
56a8d69b0e tests: fix all leaks in text-test
Fix all ASan reported leaks.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-06-28 14:21:27 +03:00
Pekka Paalanen
701676d8c6 tests: migrate client tests
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>
2020-01-30 10:10:35 +00:00
Pekka Paalanen
12a138d51e tests: replace fprintf() with testlog()
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>
2019-11-22 12:54:10 +02:00
Jussi Kukkonen
649bbce607 include stdint.h for int32_t/uint32_t
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
2016-07-26 16:26:08 -07:00
Jonas Ådahl
3bcba347a2 Use text input protocol from wayland-protocols
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>
2015-11-19 13:07:10 +02:00
Bryce Harrington
2cc9297aca tests: Update boilerplate from MIT X11 license to MIT Expat license 2015-06-15 13:04:19 -07:00
Pekka Paalanen
4ac06ff97e tests: rename client_create to create_client_and_test_surface
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>
2015-04-02 12:54:27 +03:00
Derek Foreman
f6a65928a8 tests: Rename wayland-test to weston-test
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>
2015-02-24 11:26:29 -08:00
Bryce Harrington
a76802685a tests: Cleanup superfluous headers
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>
2014-11-28 15:54:31 +02:00
Andrew Wedgbury
9cd661e746 Make sure config.h is included before any system headers
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>
2014-04-07 10:22:28 -07:00
Kristian Høgsberg
f3fa832796 build: Move clients libexec_PROGRAMS under BUILD_CLIENTS conditional
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
2014-01-01 13:52:20 -08:00
Jan Arne Petersen
62ece76b1e text: Rename text_input to wl_text_input
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 17:06:27 -04:00
Jan Arne Petersen
00191c7c4a text: Fix serial handling
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:41:48 -04:00
Jan Arne Petersen
78d00e45cc text: Rename text_model to text_input
Also rename text_model_factory to text_input_manager.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:23:35 -04:00
Jan Arne Petersen
7ef8effca5 text: Order requests and events in a nice way
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:23:14 -04:00
Jan Arne Petersen
ece6b5af51 text: Add language and text-direction to protocol
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-05-02 16:21:18 -04:00
Jan Arne Petersen
d5a97ae053 tests: Fix text-test
Updated to changed text protocol.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-20 15:12:34 -05:00
Pekka Paalanen
f2aa64f18a tests: check wl_display_roundtrip() for errors
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>
2012-12-12 10:39:01 -05:00
Kristian Høgsberg
1cb3df4e46 tests: Port text-test to new test framework
So much simpler this way and the test suite is now back too 100% pass.
2012-12-11 23:04:14 -05:00
Ander Conselvan de Oliveira
231ba171c6 compositor: Always assign an output when updating a surface transform
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.
2012-09-14 13:43:08 -04:00
Jan Arne Petersen
4c26518ad1 text: Remove surface arg in create_text_model
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>
2012-09-12 16:28:04 -04:00
Jan Arne Petersen
b00e6632f6 tests: Add unit test for text model
Add tests for activate/deactivate and unfocusing of the assigned
surface.
2012-08-29 15:02:21 -04:00