[PATCH v1 weston 11/11] tests: Construct the filename external to wl_test_record_screenshot

Pekka Paalanen ppaalanen at gmail.com
Mon Nov 24 03:31:25 PST 2014


On Wed, 19 Nov 2014 15:06:26 -0800
Bryce Harrington <bryce at osg.samsung.com> wrote:

> We need to use the output filename when we do a comparison with the
> appropriate reference image, so move the filename construction to the
> caller of record_screenshot() instead.
> 
> Doing this also requires externalizing the output iteration loop since
> we want the output number to be recorded in the filename.  In most cases
> this won't matter since we will just have a single head anyway; plus, in
> cases where we do have multiple heads we could well be caring only about
> the contents of the Nth head rather than all of them.
> 
> The fadein test doesn't care about multi-head so no need to traverse the
> list; we'll look just at head #0.
> 
> Fixes:  https://bugs.freedesktop.org/show_bug.cgi?id=83987
> Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
> ---
>  protocol/wayland-test.xml         |  3 +-
>  tests/fadein-test.c               | 40 ++++++-------------------
>  tests/weston-test-client-helper.c | 34 +++++++++++++++++++++
>  tests/weston-test-client-helper.h |  6 ++++
>  tests/weston-test.c               | 62 ++++++++++++++++++++-------------------
>  5 files changed, 83 insertions(+), 62 deletions(-)
> 
> diff --git a/protocol/wayland-test.xml b/protocol/wayland-test.xml
> index 93fbc16..4c289a6 100644
> --- a/protocol/wayland-test.xml
> +++ b/protocol/wayland-test.xml
> @@ -59,7 +59,8 @@
>        <arg name="n" type="uint"/>
>      </event>
>      <request name="record_screenshot">
> -      <arg name="basename" type="string"/>
> +      <arg name="filename" type="string"/>
> +      <arg name="head" type="uint"/>

I wonder if using the head index is stable enough. How about using a
wl_output object instead?

That would be more predictable, if we one day start testing output
hotplug, with protocol in the test interface to add and remove outputs.


Thanks,
pq


>        <arg name="clip_x" type="uint"/>
>        <arg name="clip_y" type="uint"/>
>        <arg name="clip_width" type="uint"/>


More information about the wayland-devel mailing list