[PATCH weston v2 4/6] tests: Convert keyboard-test to new test extension
Pekka Paalanen
ppaalanen at gmail.com
Sat Dec 8 00:32:45 PST 2012
On Fri, 7 Dec 2012 13:50:32 -0800
"U. Artie Eoff" <ullysses.a.eoff at intel.com> wrote:
> From: "U. Artie Eoff" <ullysses.a.eoff at intel.com>
>
> 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 at intel.com>
> ---
> tests/.gitignore | 1 +
> tests/Makefile.am | 31 ++-
> tests/keyboard-test.c | 139 ++++-------
> 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 +++++
> 7 files changed, 835 insertions(+), 103 deletions(-)
> 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
...
> diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c
> new file mode 100644
> index 0000000..1859356
> --- /dev/null
> +++ b/tests/weston-test-client-helper.c
> @@ -0,0 +1,488 @@
...
> +void
> +yield(struct client *client)
> +{
> + /*
> + * FIXME: ugh! how do we ensure all events have finished
> + * propagating to the client. The calls to usleep seem to do a
> + * pretty reasonable job... and without them, tests can fail
> + * intermittently.
> + */
> + usleep(0.02 * 1e6);
> + wl_display_flush(client->wl_display);
> + wl_display_roundtrip(client->wl_display);
> + usleep(0.02 * 1e6);
> +}
This FIXME is still here. Did I guess the cause wrong in my earlier
comment, or have you just not had the opportunity to look into it
yet?
Thanks,
pq
More information about the wayland-devel
mailing list