Jonas Ådahl
195766cb69
tests: Add helper for creating virtual test monitors
...
This uses virtual monitors in the headless backend, in contrast to the
ones used by the monitor configuration tests which use the nseted
backend.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
b7f23c1baf
tests/utils: Add helper to find a window given a title
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
c611b64c53
monitor-config-store: Add way to define config store loading policy
...
This adds a way to define a way, at the system level, to define a policy
of how monitor configuration files are loaded.
The intended use case is to e.g. either prefer system level monitor
configurations before user levels, or only allow system level
configurations.
Examples:
Prefer system over user level configurations:
<monitors version="2">
<policy>
<stores>
<store>system</store>
<store>user</store>
</stores>
</policy>
<configuration>
...
</configuration>
</monitors>
Only allow system level configurations:
<monitors version="2">
<policy>
<stores>
<store>system</store>
</stores>
</policy>
<configuration>
...
</configuration>
</monitors>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2030 >
2022-01-25 16:25:48 +00:00
Jonas Ådahl
d84f7971e4
tests/utils: Add meta_wait_for_paint() helper
...
This function queues a full stage redraw, then waits for every view to
receive the "presented" signal before returning.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2237 >
2022-01-16 18:38:20 +00:00
Jonas Ådahl
57d1d82ead
test/utils: Add helper to set custom monitors config
...
Make the existing implementation a wrapper to avoid changing monitor
config tests.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2237 >
2022-01-16 18:38:20 +00:00
Jonas Ådahl
1f758dd78c
test/utils: Make (WAYLAND_)DISPLAY passing to client optional
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2237 >
2022-01-16 18:38:20 +00:00
Jonas Ådahl
1886785b3d
test/utils: Make meta_test_client_do*() not crash on NULL error
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2237 >
2022-01-16 18:38:20 +00:00
Jonas Ådahl
68fd9bf534
test/utils: Add vararg variant of meta_test_client_do()
...
To be used by wrapper that puts the error in a g_error().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2237 >
2022-01-16 18:38:20 +00:00
Jonas Ådahl
9cda0bd719
tests: Make common test code a shared library
...
This will require some symbol exporting, but the benefit is that have
better control of what external test cases can do in terms of creating
more testing specific contexts.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 13:40:34 +02:00
Jonas Ådahl
d8107027ef
tests/test-utils: Move test client path ensure helper to private header
...
It's only used from the test context, and the main test utils header
file will be used to export helper functionality, so move it out,
preparing for that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
724a7eee74
tests: Move 'wait-for-X11-display' helper to MetaContextTest
...
Gets rid of a un-prefixed helper function relying on a global singleton.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
e8742be568
tests/test-utils: Remove unused init function
...
This is now dealt with by MetaContextTest.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
acb0a44224
tests: Prefix test plugin name getter with meta_
...
It'll be used via the new shared library, so prefix it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
9f1f3139b8
tests/utils: Prefix AsyncWaiter with Meta
...
This too will be used by test cases via a shared library.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
4a6e22311a
tests/utils: Prefix TestClient with Meta
...
Soon we'll expose it via a libmutter-test library.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:40 +02:00
Jonas Ådahl
f74d311d61
tests: Rename test-utils.c/h to meta-test-utils.c/h
...
Otherwise it'll conflict with other files with identical filenames,
if one would add src/tests/ to the include path, which will happen in a
later commit.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861 >
2021-07-15 11:42:39 +02:00