tests: fix the cursor race in internal-screenshot
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 10 Jun 2016 07:50:04 +0000 (10:50 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Thu, 23 Jun 2016 15:04:19 +0000 (18:04 +0300)
commite651bb021edea78352b97116e5bb226788fc125d
tree284978d9891e4271274af6c7090ecb927d3cae38
parentb5e3ea218b183b91e17b843b375fadd37563a1c0
tests: fix the cursor race in internal-screenshot

This fix also depends on "compositor-headless: do not create a seat".

If we lose the race against weston-desktop-shell setting cursors, which
is very rare, we get a cursor image in the screenshot, causing the test
to fail. This is now fixed by moving the (remaining) cursor out of the
way.

Arguably we should have better solutions for this, but that is another
story. This is a stop-gap measure we can copy also in new
screenshooting tests.

v2: Remove the example code for how to trigger the race, and rewrite the
big comment.

Cc: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
tests/internal-screenshot-test.c