[PATCH weston v2 0/6] Wayland/Weston Test Extension

Kristian Høgsberg hoegsberg at gmail.com
Tue Dec 11 20:31:37 PST 2012


On Fri, Dec 07, 2012 at 01:50:28PM -0800, U. Artie Eoff wrote:
> From: "U. Artie Eoff" <ullysses.a.eoff at intel.com>
> 
> Define a relatively generic protocol for a Wayland Test
> Extension.  Provide a Weston implementation and use it
> in the Weston client tests.  Support both module-style
> and extension-style tests.

Yup, this is good now.  I've merged the series and I had a look at the
cases where you use the yield() function.  It's just as Pekka said, in
some cases (when we map a surface or move it) the transforms aren't
updated until we repaint.  In that case we can just use a surface
frame callback to wait for that.  When we receive the frame callback
we know the compositor has repainted and updated the transform
matrices and can expect the new geometry to be in effect.

In all other cases, wl_display_roundtrip() is sufficient: we send a
wl_test request to move the pointer or such and that will immediately
trigger an event.  To make sure the server has receive the wl_test
request and sent the resulting events and that the test client helper
has processed the events and updated the state, all we need is the
round trip.  I made those changes and dropped the yield() helper.

> Addresses bugs:
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=56819
> https://bugs.freedesktop.org/show_bug.cgi?id=56821
> https://bugs.freedesktop.org/show_bug.cgi?id=56822
> 
> NOTE: text-test and client-test still remain to be converted
> to the new test extension.

I ported text-test to the new framework and got:

 5 files changed, 143 insertions(+), 429 deletions(-)

and the code is much easier to follow.  client-test isn't really
interesting anymore, it just tests the old test-client framework, and
since we're dropping that, we'll just drop client-test.  And with
that, the old test-runner.[ch] helper is gone.

Anyway, this is all upstream and we're ready to start writing a lot
tests now :)

Kristian

> U. Artie Eoff (6):
>   tests: Define and implement a test protocol extension.
>   tests: Rename weston-test to weston-tests-env
>   tests: Allow weston-tests-env to process different test types
>   tests: Convert keyboard-test to new test extension
>   tests: Convert event-test to new test extension
>   tests: Convert button-test to new test extension
> 
>  protocol/Makefile.am              |   3 +-
>  protocol/wayland-test.xml         |  55 ++++
>  tests/.gitignore                  |   6 +
>  tests/Makefile.am                 |  81 +++++-
>  tests/button-test.c               | 128 ++-------
>  tests/event-test.c                | 527 +++++++++++++++++++-------------------
>  tests/keyboard-test.c             | 139 +++-------
>  tests/weston-test                 |   4 -
>  tests/weston-test-client-helper.c | 488 +++++++++++++++++++++++++++++++++++
>  tests/weston-test-client-helper.h | 109 ++++++++
>  tests/weston-test-runner.c        | 114 +++++++++
>  tests/weston-test-runner.h        |  56 ++++
>  tests/weston-test.c               | 248 ++++++++++++++++++
>  tests/weston-tests-env            |  12 +
>  14 files changed, 1485 insertions(+), 485 deletions(-)
>  create mode 100644 protocol/wayland-test.xml
>  delete mode 100644 tests/weston-test
>  create mode 100644 tests/weston-test-client-helper.c
>  create mode 100644 tests/weston-test-client-helper.h
>  create mode 100644 tests/weston-test-runner.c
>  create mode 100644 tests/weston-test-runner.h
>  create mode 100644 tests/weston-test.c
>  create mode 100755 tests/weston-tests-env
> 
> -- 
> 1.7.11.7
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list