tests: implement client_destroy()
authorPekka Paalanen <pekka.paalanen@collabora.com>
Fri, 24 Jan 2020 11:14:27 +0000 (13:14 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.com>
Thu, 27 Feb 2020 14:08:42 +0000 (16:08 +0200)
commit080d85b8fbed2d55873371a36b460923cd5e46d0
tree68e927a89f12242b6224cdcc7d4457e48e6ce03f
parent444f1a8e225f39526937e10763f006e7602e2163
tests: implement client_destroy()

It turns out that if the client is not explicitly destroyed, it will remain
connected until the compositor shuts down because there is no more a client
process that would terminate.

Usually this is not a problem, but if a test file has multiple screenshooting
tests, the windows from earlier tests in the file will remain on screen. That
is not wanted, hence implement client destruction.

To properly destroy a client, we also need a list of outputs. They used to be
simply leaked. This does not fix wl_registry.global_remove for wl_outputs, that
is left for a time when a test will actually need that.

This patch makes only ivi-shell-app test use the new client_destroy() to show
that it actually works. The added log scopes prove it: destroy requests get
sent. Sprinkling client_destroy() around in all other tests is left for a time
when it is actually necessary.

ivi-shell-app is a nicely simple test doing little else, hence I picked it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
tests/ivi-shell-app-test.c
tests/weston-test-client-helper.c
tests/weston-test-client-helper.h