This cleans up the 'make check' output considerably. When all goes well,
you will only see the "PASS" line for each of $TESTS.
Weston logs into a separate file than stdout and stderr, so server logs
end up in one file per test, and other output to another file per test.
'make distclean' does not remove the tests/logs/ directory.
Also changes the weston-tests-env interpreter to bash, since I think &>
and ${1/.la/.so} might be bashisms.
The remaining module tests don't need to fork and talk to a test client,
so just convert them to regular modules and let them handle running their
tests themselves. Then drop test-runner.[ch].
This test case is the last user of the test-client code and it only
tests launching the test-client. In other words it's a minimal test
of the framework we're dropping, so just drop this test.
Remaining use case was when we move the pointer. This doesn't change
geometry so we can just use a wl_display_roundtrip() to make sure
we get the request to the server and receive the resulting events.
As for button-test, a wl_display_roundtrip is sufficient here. The
yield() between wl_test_activate_surface() and wl_test_send_key() is
also not needed, since the two requests will arrive at the server in
order, and will activate the surface first, then send a key event.
A round trip is sufficient here. We need to make sure that the server
has received the wl_test request and that we've received the event
that the request triggers. The wl_display_roundtrip() helper does
exactly that: it sends a wl_display.sync request, which will hit the
server after the wl_test requests and thus the wl_callback.done event
will come back after the server has seen all the previous requests and
after we've handled all preceeding event.
When moving a test surface, use a frame callback to make sure the
surface has been moved and the geometry updated. The compositor may
delay updating the transform matrices, but once we get the frame
callback we know the surface has been repainted and the geometry
updated.
This adds a weston-test-runner for the weston test extension and
some weston test client helper methods.
Converted keyboard-test to use the new test interface, runner,
and helper methods.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56822
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The weston-tests-env script needs to be able to handle weston
test extension style tests as well as module style tests.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Renamed weston-test test environment script to weston-tests-env
to avoid ambiguity with weston-test.c (the weston test extension).
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
The weston test extension, called weston-test.so, can be loaded
from the "modules" configuration option on the command line
or in the .ini file.
Clients can bind to the "wl_test" interface to interact with
the weston test extension.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Since the send-button-state request comes in on one socket and the
wayland event we're looking for comes in on another socket, the order
that we process the two in is undefined. Thus, button-test fails
intermittently, depending on which event we process first.
We change wl_display_flush() to wl_display_roundtrip(), to make sure that
we deal with all wayland events before handling test protocol requests.
In seat_handle_capabilities, if input->pointer is not properly
initialized, then it will contain an arbitrary value and results
in the wl_pointer listener not getting registered if that value
is not 0/null. Thus, use calloc to initialize the "input" instance.
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=49937
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.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.
Add key event to the text_model interface and a key request to the
input_method_context interface. Implement it in the example editor
client and the example keyboard.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
Add delete_surrounding_text event in the text_model interface and the
request in the input_method_context interface. Implement it in the
example editor client and in the example keyboard so that the backspace
key works with it.
Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
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>
We can now load any number of general modules, and the shell and xwayland
are just two of them. We continue to use the mechanism for testing but
custom input drivers or logging mechanisms, for example are other use cases.
Modify the pkg-config check for setbacklight so that failure only
disables building setbacklight, instead of failing the whole configure.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
These keymap events communicate the keymap from the compositor to the
clients via fd passing, rather than having the clients separately
compile a map.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Instead of using a uint32_t for state everywhere (except on the wire,
where that's still the call signature), use the new
wl_pointer_button_state enum, and explicit comparisons.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Took me a second to work out that the 272 was actually BTN_LEFT, as keys
and buttons share a namespace in evdev.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
wl_input_device has been both renamed and split. wl_seat is now a
virtual object representing a group of logically related input devices
with related focus.
It now only generates one event: to let clients know that it has new
capabilities. It takes requests which hand back objects for the
wl_pointer, wl_keyboard and wl_touch interfaces it exposes which all
provide the old input interface, just under different names.
This commit tracks these changes in weston and the clients, as well as
similar renames (e.g. weston_input_device -> weston_seat). Some other
changes were necessary, e.g. renaming the name for the visible mouse
sprite from 'pointer' to 'cursor' so as to not conflict.
For simplicity, every seat is always exposed with all three interfaces,
although this will change as time goes on.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
To add greater precision when working with transformed surfaces and/or
high-resolution input devices.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>