[PATCH weston 0/2] Fix up internal screenshot test

Derek Foreman derekf at osg.samsung.com
Mon May 25 13:19:36 PDT 2015


Currently the screenshot test has a race condition - sometimes it's all good,
sometimes it just gets a black screen.

Until desktop-shell is finished starting, there's a black "fade surface" over
everything.  Currently this is removed after a 15 second timeout even if the
shell fails to start in that time.

This makes that shell startup wait configurable, and sets it to 0 for our test
so we never end up waiting for the shell to show up, and our window is
displayed immediately.

Then it fixes the screenshot test by making it create a surface of its own
with known data and screenshotting that, clipping away anything that may
or may not have been rendered by the shell.

Derek Foreman (2):
  desktop-shell: Add an option for shell startup timeout
  internal-screenshot-test: Fix test so it doesn't expect shell surfaces

 desktop-shell/shell.c                           |  18 +++++--
 man/weston.ini.man                              |   5 ++
 tests/internal-screenshot-test.c                |  63 ++++++++++++++++++------
 tests/internal-screenshot.ini                   |   1 +
 tests/reference/internal-screenshot-00.png      | Bin 5149 -> 0 bytes
 tests/reference/internal-screenshot-bad-00.png  | Bin 0 -> 5149 bytes
 tests/reference/internal-screenshot-good-00.png | Bin 0 -> 970 bytes
 weston.ini.in                                   |   1 +
 8 files changed, 71 insertions(+), 17 deletions(-)
 delete mode 100644 tests/reference/internal-screenshot-00.png
 create mode 100644 tests/reference/internal-screenshot-bad-00.png
 create mode 100644 tests/reference/internal-screenshot-good-00.png

-- 
2.1.4



More information about the wayland-devel mailing list