tests: Indicate headless compositor presence in config.h

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
compositor: Document options for headless compositor

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
tests: Add a fadein test

This also serves as a proof of concept of the screen capture
functionality and as a demo for snapshot-based rendering verification.

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
tests: Add test reference directory and images for fadein

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
tests: Add support for comparing output against reference images

This lift's files_equal() routine to do byte comparison of the rendered
files.  Note that since the clock time will change run to run we can
only compare against the first frame (which will be black).

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
test: Use only a clipped portion of screenshot for comparisons

Allow tests to define a clipped portion of the screen to look at when
comparing rendered output to reference images.  This has two benefits.
First it allows us to exclude areas of the screen we don't care about
(e.g. the clock).  Second it makes the reference images much smaller in
git (since the masked out areas compress down to just a few bytes).

Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
tests: Promote files_equal() to a test-client-helper routine
tests: Drop debugging output in dump_image
tests: Construct the filename external to wl_test_record_screenshot

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.
tests: Add filename construction to client helper routines