weston/tests
Pekka Paalanen f5b74f7ded tests: ivi_layout test infrastructure
Testing the ivi_layout API requires two things:
- the tests must be written as a controller module to access the API
- the tests need a helper client to create some objects that can then be
  managed via the API

This patch adds all the infrastructure and two different kinds of
example tests.

Internal ivi-shell (ivi_layout) API tests are listed as ivi-*.la files
in TESTS in Makefile.am. Weston-tests-env detects these, and runs Weston
with ivi-shell, and loads the given module as a controller module, not
as a normal plugin.

The test controller module ivi-*.la will launch a helper client. For
ivi-layout-test.la the helper client is ivi-layout.ivi.

The helper client uses the weston-test-runner framework to fork and exec
each TEST with a fresh connection to the compositor.

The actual test is triggered by the weston_test_runner protocol
interface, a new addition to weston-test.xml. The helper client uses
weston_test_runner to trigger a test, and the server side of the
interface is implemented by the test controller module
(ivi-layout-test.la).

The server side of weston_test_runner uses the same trick as
weston-test-runner.h to gather a list of defined tests. A test is
defined with the RUNNER_TEST macro.

If a test defined by RUNNER_TEST succeeds, an event is sent to the
helper client that it can continue (or exit). If a test fails, a fatal
protocol error is sent to the helper client.

Once the helper client has iterated over all of its tests, it signals
the batch success/failure via process exit code. That is cought in the
test controller module, and forwarded as Weston's exit code.

In summary: each ivi_layout test is a combination of a client side
helper/setup and server side actual tests.

v2: Load weston-test.so, because create_client() needs it.

v3: add a comment about IVI_TEST_SURFACE_ID_BASE.

v4: Rebased to upstream weston-tests-env changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com> (v2)
2015-04-09 09:27:05 +03:00
..
.gitignore Makefile.am: Fix protocol source files usage 2014-02-01 21:21:39 -08:00
bad-buffer-test.c tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
buffer-count-test.c tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
button-test.c tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
config-parser-test.c Make sure config.h is included before any system headers 2014-04-07 10:22:28 -07:00
devices-test.c tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
event-test.c tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
ivi-shell-app-test.c tests: add a basic ivi-shell test 2015-04-09 09:25:44 +03:00
ivi-test.h tests: ivi_layout test infrastructure 2015-04-09 09:27:05 +03:00
ivi_layout-test-plugin.c tests: ivi_layout test infrastructure 2015-04-09 09:27:05 +03:00
ivi_layout-test.c tests: ivi_layout test infrastructure 2015-04-09 09:27:05 +03:00
keyboard-test.c tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
matrix-test.c matrix-test: fix units in report 2014-09-05 11:32:36 +03:00
presentation-test.c tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
roles-test.c tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
setbacklight.c tests: Cleanup superfluous headers 2014-11-28 15:54:31 +02:00
subsurface-test.c tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
surface-global-test.c Make sure config.h is included before any system headers 2014-04-07 10:22:28 -07:00
surface-screenshot.c surface-screenshot: a new manual test module 2015-02-25 14:48:02 +02:00
surface-test.c tests: Cleanup superfluous headers 2014-11-28 15:54:31 +02:00
text-test.c tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
vertex-clip-test.c tests: Cleanup superfluous headers 2014-11-28 15:54:31 +02:00
weston-test-client-helper.c tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
weston-test-client-helper.h tests: rename client_create to create_client_and_test_surface 2015-04-02 12:54:27 +03:00
weston-test-runner.c tests: Cleanup superfluous headers 2014-11-28 15:54:31 +02:00
weston-test-runner.h tests: Move ARRAY_LENGTH to a shared header for reuse 2014-11-28 15:56:45 +02:00
weston-test.c tests: use special seat 2015-03-31 11:11:52 +03:00
weston-tests-env tests: ivi_layout test infrastructure 2015-04-09 09:27:05 +03:00
xwayland-test.c xwayland-test: Replace the xwayland-test 2015-01-30 12:21:39 -08:00