Commit Graph

88 Commits

Author SHA1 Message Date
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
Giulio Camuffo 7fe01b18d8 sdk: be C++ friendly
This renames the weston_surface's private member to configure_private
and externs "C" the headers of the SDK.
2013-03-28 14:03:58 -04:00
Pekka Paalanen c3ce738653 compositor: introduce weston_surface_geometry_dirty()
Instead of directly setting the dirty flag on weston_surface geometry,
use a function for that.

This allows us to hook into geometry dirtying in a following patch.

Also add comments to weston_surface fields, whose modification causes
transform state to become outdated.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-03-18 22:19:57 -04:00
Giulio Camuffo 82cb505287 tests: attach the surface's buffer when moving it
move_client() needs to attach the buffer, even if it was attached already,
because since 184df50 configure() will be called only on newly attached
surfaces, but the one that sets the test surface position is the configure
function.
2013-03-04 12:28:42 -05:00
Kristian Høgsberg 068b61c254 compositor: Change notify_motion to take relative motion events 2013-02-28 14:57:01 -05:00
Giulio Camuffo 184df50d3e compositor: call configure on surfaces with a null buffer too
This way the shell can know when a surface has been unmapped by
checking the value returned by weston_surface_is_mapped(surface).
The configure handlers have now width and height parameters, so
they do not need anymore to check manually the buffer size.
If a surface's buffer is NULL the width and height passed to the
configure are both 0.
Configure is now only called after an attach. The variable
weston_surface.pending.newly_attached is set to 1 on attach, and
after the configure call is reset to 0.
2013-02-27 15:32:04 -05:00
Quentin Glidic f14977f854 tests: Use&Fix parallel tests
Also fix automake 1.13 support

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2013-02-22 08:35:22 -05:00
Kristian Høgsberg cb4685bbd1 Pass argc and argv to modules
This lets modules parse options from the command line.
2013-02-20 15:37:49 -05: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
Kristian Høgsberg a1377cf198 Add missing builddir includes for version.h
af4f2aaf19 broke this
2013-02-20 14:47:43 -05:00
Kristian Høgsberg af4f2aaf19 Install header files and pkg-config file for external modules
This patch installs the three header files that define the compositor
plugin interface as well as a pkg-config file.  This allows
building weston plugins outside the weston tree.  We currently don't make
any guarantees about the plugin API/ABI except that within a stable
branch we won't break it.
2013-02-18 15:29:35 -05:00
Jan Arne Petersen a75a789fc1 text: fix weston key bindings with input methods
Add a struct weston_keyboard, to handle the input method grab.

Signed-off-by: Jan Arne Petersen <jpetersen@openismus.com>
2013-02-15 17:02:26 -05:00
Pekka Paalanen d1c426eef7 tests: add test for buffer release event
Tests especially, that attach-attach-commit does not result in a release
of the first buffer.

Also tests, that the old buffer is released when a new buffer has been
attached, committed, and displayed (frame callback).

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-02-08 13:38:17 -05:00
Pekka Paalanen 32ac9b9245 tests: export create_shm_buffer() helper
Lets the tests create additional buffers easily.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-02-08 13:38:14 -05:00
Pekka Paalanen 8aaef7d48c tests: add frame callback waiting helpers
To avoid duplicating the code for setting and waiting for a frame
callback, add helpers for it.

Convert move_client() to use the new helpers.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-02-08 13:38:09 -05:00
Tiago Vignatti 19dadf2617 tests: Add XWayland test
By default enabled but one can disable it by passing --disable-xwayland-test
to the configure script. Also, the weston-tests-env script is trying to load
xwayland.so in either case, but it behaves resilient in the absence of that
meaning all the other tests are still going to be kicked for running.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2013-02-08 12:18:05 -05:00
U. Artie Eoff 209e8f177a tests: fix assignment typo, should be comparison
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2013-02-07 21:18:35 -05:00
Pekka Paalanen 585c27c717 tests: make signal other than ABRT a hard failure
We handle FAIL_TEST tests by simply inverting the success flag. The
problem with this is, that if a FAIL_TEST fails by a SIGSEGV, it will be
interpreted as passed. However, no code should ever cause a SEGV, or any
other signal than ABRT. And even ABRT only in the case of an assert()
that is meant to fail. We would probably need more sophistication for the
FAIL_TEST cases.

For now, just interpret any other signal than ABRT as a hard failure,
regardless whether it is a TEST or FAIL_TEST. At least segfaults do not
cause false passes anymore.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-01-24 16:24:22 -05:00
Rob Bradford c59a33a1e2 tests/setbacklight: Close filedescriptor on return paths 2013-01-10 16:07:08 -05:00
Kristian Høgsberg e565b40569 tests: Pass --backend so the test suite runs with the right modules
Without this we try to load the installed backends, which is nasty for
regular runs, and just doesn't work for make distcheck, which sets
prefix to $PWD/_inst.  This makes sure we load the right backend
and make distcheck pass.  Other modules (xwayland, shells etc) just don't
get loaded for distcheck and for make check we still try to load the
installed modules.
2012-12-14 16:34:00 -05:00
Pekka Paalanen d56d4d5f44 tests: remove test logs on 'make clean'
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-13 13:10:06 -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
Pekka Paalanen 07921d791a tests: set client log handler
Otherwise we cannot normally see protocol errors etc. in the test
output.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-12 10:38:48 -05:00
Pekka Paalanen c660821918 update git ignores
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-12-12 10:38:45 -05:00
Pekka Paalanen fd51796094 tests: write logs to files
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.
2012-12-12 10:38:38 -05:00
Kristian Høgsberg 15be01ebe6 tests: Convert remaining module tests to not use test-runner.c
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].
2012-12-11 23:22:16 -05:00
Kristian Høgsberg cbc35ae281 tests: Remove client-test test
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.
2012-12-11 23:16:11 -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
Kristian Høgsberg ba0cfdd284 tests: Drop yield() helper function
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.
2012-12-11 22:17:35 -05:00
Kristian Høgsberg 1f4d8e9def keyboard-test: Use wl_display_roundtrip() instead of yield()
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.
2012-12-11 22:00:54 -05:00
Kristian Høgsberg f63fab7241 button-test: Use wl_display_roundtrip instead of yield()
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.
2012-12-11 21:58:22 -05:00
Kristian Høgsberg db6dc7d470 weston-test-client-helper: Use a frame callback to flush surface geometry
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.
2012-12-11 21:50:14 -05:00
U. Artie Eoff 0a7d588740 tests: Convert button-test to new test extension
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56821

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11 15:30:40 -05:00
U. Artie Eoff 84f9db5f90 tests: Convert event-test to new test extension
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56819

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-12-11 15:30:33 -05:00
U. Artie Eoff 1ba9b38ec6 tests: Convert keyboard-test to new test extension
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>
2012-12-11 15:30:25 -05:00
U. Artie Eoff 617f478df3 tests: Allow weston-tests-env to process different test types
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>
2012-12-11 15:30:05 -05:00
U. Artie Eoff e491b13d0a tests: Rename weston-test to weston-tests-env
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>
2012-12-11 15:29:58 -05:00
U. Artie Eoff 65e7e7a65b tests: Define and implement a test protocol extension.
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>
2012-12-11 15:29:52 -05:00
Rob Bradford 4a822495fa Move matrix.[ch] to shared
This means it can be used for the calibration tool.
2012-12-06 15:53:03 -05:00
Kristian Høgsberg f3dfe716f3 tests: Remove last GLfloat use
With the EGL/GLES2 types out of compositor.h this now fails to compile.

https://bugs.freedesktop.org/show_bug.cgi?id=57129
2012-11-14 14:42:51 -05:00
Kristian Høgsberg 128ee2c342 test-client: Make sure we process pending eevents before we verify state
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.
2012-10-21 22:30:26 -04:00
John Kåre Alsaker 011a1ce350 Remove some dead code. 2012-10-16 11:29:10 -04:00
Kristian Høgsberg d1ecb284ba tests: Update tests to new APIs 2012-10-11 10:07:31 -04:00
John Kåre Alsaker 71c474416a tests: Remove GLfloat usage. 2012-10-04 12:28:04 -04:00
U. Artie Eoff 840d5f975b tests: add keyboard test
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-10-04 11:40:57 -04:00
U. Artie Eoff 58990cae31 tests: add button test
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-10-04 11:40:04 -04:00
U. Artie Eoff d690175a22 tests: test surface to/from global functions
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-10-04 11:39:59 -04:00
U. Artie Eoff 1ae298f9d9 event-test: more aggressive event testing
Test surface pointer enter/leave/motion and surface leave/enter
events more aggressively.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2012-10-04 11:39:55 -04:00