Georges Basile Stavracas Neto
8f6469f6cb
tests/interactive: Replace cogl_texture_new_from_file
...
The interactive tests are the last users use this deprecated API, so
port them to the appropriate alternatives - either CoglTexture2D or
CoglTexture2DSliced.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Georges Basile Stavracas Neto
ca0e467a3b
tests/interactive: Drop test-cogl-image-convert
...
This test exercises a form of image conversion that isn't exposed in
the new CoglTexture2D APIs, which is about to be removed. Drop this
test.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Georges Basile Stavracas Neto
da8353dbcd
tests/interactive: Replace most CoglHandles by CoglTextures
...
There are 2 remaining CoglHandles, but they're for shaders, which
actually return CoglHandle as part of the API signature.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Georges Basile Stavracas Neto
9f3191fe9c
tests/interactive: Drop empty test_coglbox_finalize
...
All of them were devoid of code.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Georges Basile Stavracas Neto
dbae8d7aa7
tests/interactive: Make TestCoglbox final
...
This cleans up a lot of boilerplate code.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Georges Basile Stavracas Neto
83e0553534
tests/interactive: Cleanup tabs
...
I also sneaked in some code style fixes on the lines that were
touched. Judge me freely, it's all for the greater good.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2355 >
2022-05-31 16:25:11 -03:00
Jonas Ådahl
e939d5b89a
tests: Check that X11 selections handle Xwayland disappearing
...
It works by using an X11 client to set the clipboard content, using a
mimetype that on purpose is not handled by the clipboard manager. The
test then makes sure we don't crash when trying to transfer data from
the old X11 selection source.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364 >
2022-05-31 12:00:55 +00:00
Jonas Ådahl
7e8bddccb5
tests/async-waiter: Keep track of X11 display it was created with
...
The Xwayland server can go away at any time; when this happen we might
have a test client running, and for it to tear down more nicely, make
sure to avoid trying to clean up X11 resources on the old X11 display.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364 >
2022-05-31 12:00:55 +00:00
Jonas Ådahl
c575696acc
tests/test-client: Add clipboard-set command
...
To be used for clipboard testing.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2364 >
2022-05-31 12:00:54 +00:00
Jonas Ådahl
f64259ceae
tests/wayland: Draw surface with shared helper
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
9b97c9b4d4
tests/wayland/xdg-toplevel-bounds: Port to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
2c2aa7acc3
tests/wayland/xdg-activation: Port to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
a7161e1132
tests/wayland/subsurface-reparenting: Port to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
e32b9956fe
tests/wayland/subsurface-remap-toplevel: Port to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
1562bcc6fd
tests/wayland/subsurface-parent-unmapped: Port to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
08acf51423
tests/wayland-display: Emit sync event signal from test driver
...
This is for hooking up sync events from the compositor side test case.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
d5367f7332
tests/wayland: Make display helper a GObject
...
This is in preparation for adding signals.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
b0528dcd53
tests/wayland: Port xdg-shell action tests to WaylandDisplay
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
d58bd948a8
tests/wayland/subsurfaces: Use helper to manage display
...
Adds a _free() function since the display is reopened multiple times and
cleaned up in between.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Jonas Ådahl
a936219983
tests/xdg-apply-limits: Move out generic display management
...
This is meant to be used by other test clients, in order to reduce the
amount of code duplication that currently exists in the test cases.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2416 >
2022-05-17 08:03:29 +00:00
Dor Askayo
40edfbcbeb
tests/screen-cast: Avoid undefined behavior with GSource
...
Follow the existing convention in Mutter and avoid downcasting
custom GSource structs.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2406 >
2022-05-11 15:01:31 +00:00
Jonas Ådahl
70ab4b6519
build: Make each executable/library have their own log domain
...
This helps reading log output during, as it's otherwise often unclear
whether a log entry came from a test client or mutter itself.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2391 >
2022-04-29 18:58:38 +00:00
Bartłomiej Piotrowski
7a7fb863a2
tests/virtme-run: Expose two CPUs
...
We're multi threaded, so make things more like reality by exposing more
CPUs using the '-smp 2' qemu option.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152 >
2022-03-28 16:17:21 +00:00
Bartłomiej Piotrowski
7435bfd0e5
tests/virtme-run: Disable pdcm
...
There are issues when running a nested KVM with Fedora 35 when pdcm is
enabled. Work around this for now by disabling it.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=2022075
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152 >
2022-03-28 16:17:21 +00:00
Bartłomiej Piotrowski
4ce233b89e
tests/virtme-run: Create fake stdin
...
When running in CI, the stdin may be /dev/null, which causes issues
for qemu. Avoid this issue by creating our own fake stdin.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152 >
2022-03-28 16:17:21 +00:00
Jonas Ådahl
31bc1c80ab
tests/kvm: Forward the test environment variables to the VM
...
This will help with finding the right libdefault.so and correctly setup
the GLib test framework.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152 >
2022-03-28 16:17:21 +00:00
Jonas Ådahl
189068d465
tests/build: Set up test environment using a dict()
...
This will allow us to reuse the keys and values more easily, as later
commits will rely on being able to iterate over the keys and values to
construct explict env strings for passing into special test cases.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2152 >
2022-03-28 16:17:21 +00:00
Jonas Ådahl
1914f533b8
tests/screen-cast: Add input injection tests to screen cast client
...
This tests that cursor metadata are handled properly, and that the
display server handles input events correctly, including ones that are
sent too early.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2270 >
2022-03-04 18:13:45 +00:00
Jonas Ådahl
d649445bb7
tests/screen-cast: Also make it a remote desktop session
...
This will allow emitting input events / remote control too.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2270 >
2022-03-04 18:13:45 +00:00
Jonas Ådahl
88cfd31f18
tests/screen-cast: Test virtual stream resizing
...
This test resizes the stream by updating the PipeWire stream properties.
This triggers a format negotiation, that results in the buffers being
reallocated with the new size. The test makes sure we eventually
receive this new size.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2270 >
2022-03-04 18:13:45 +00:00
Jonas Ådahl
c49037469a
tests/screen-cast-client: Set an explicit size
...
Don't set a range, take control of the size. This is fine, since we're
only recording virtual monitors, which get their size from the PipeWire
negotiation.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2270 >
2022-03-04 18:13:45 +00:00
Jonas Ådahl
fadffe3fad
wayland/xdg-shell: Add toplevel bounds support
...
This implements the new 'bounds' event that is part of the xdg_toplevel
interface in the xdg-shell protocol. It aims to let clients create
"good" default window sizes that depends on e.g. the resolution of the
monitor the window will be mapped on, whether there are panels taking up
space, and things like that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2167 >
2022-03-04 14:48:25 +00:00
Jonas Ådahl
28a5946a28
tests/wayland-unit-tests: Remove unnecessary message check
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2167 >
2022-03-04 14:48:25 +00:00
Jonas Ådahl
cb424b68e6
tests/wayland-unit-tests: Make some function names less generic
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2167 >
2022-03-04 14:48:25 +00:00
Carlos Garnacho
e736b04deb
clutter: Remove "source" event union fields
...
These are no longer used, drop the last places that modify those
in event structs and remove them.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2311 >
2022-03-04 10:58:28 +00:00
Carlos Garnacho
5dd818cf1a
tests: Move away from clutter_event_get_source()
...
The target actor as seen by the stage is equivalent, so use that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2311 >
2022-03-04 10:58:28 +00:00
Jonas Ådahl
5588f2a21c
tests: Decrease boiler plate needed for adding more tests
...
Structure tests in a list of dictionaries, instead of requiring each
test to have its own executable(...) and test(...) statement. The
intention of this is to make it easier to add more test cases.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
afca974405
tests: Move monitor test utils into libmutter-test.so
...
It already was built into it without any symbols exported, but also
duplicated in test cases that used it. Make it so that the built in
functions are exported, with prefixes, and make all tests use the
exported functions. While at it, make things go via MetaContext or
MetaBackend depending on how early in initialization things are run.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
3fc0d8b81d
tests/build: Remove duplicated meta-gpu-test.c file inclusion
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
15b8f89c02
tests: Move ref test framework to libmutter-test.so
...
Will make it available to most tests without having to explicitly
include.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Jonas Ådahl
bd18af1a0d
tests/build: Sort sources list
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
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
b522e3cecd
tests/wayland: Move test client helper into a utils file
...
This will make it easier to run Wayland test cases from other test
executables.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2262 >
2022-02-09 09:04:09 +00:00
Carlos Garnacho
b8853b07a5
tests: Rewrite interactive Clutter grabs tests
...
So it uses ClutterGrab, instead of an API that is soon to disappear.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2100 >
2022-01-29 02:11:37 +01:00
Carlos Garnacho
3a79b7b066
clutter: Add docs and introspection annotations to grabs
...
Since we want these accessed from bindings this must be a boxed
type. This has the side effect of making ClutterGrab a refcounted
object, since we want to avoid JS from pointing to freed memory
and maybe causing crashes if misusing the object after dismiss.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2099 >
2022-01-29 00:37:14 +00:00
Carlos Garnacho
6144244201
clutter: Drop clutter_stage_[gs]et_motion_events_enabled()
...
This is (luckily!) unused, and it's inconvenient to have a toggle to
break the input model we are striving towards. Drop this function
and stick to the default behavior.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2099 >
2022-01-29 00:37:14 +00:00
Jonas Ådahl
b49421d8e8
monitor-config-store: Allow changing D-Bus configuration policy
...
Adding a <dbus/> element containing a boolean (yes/no) determines
whether org.gnome.Mutter.DisplayConfig ApplyMonitorsConfig will be
callable. The state is also introspectable via the
ApplyMonitorsConfigAllowed property on the same interface.
For example
<monitors version="2">
<policy>
<dbus>no</dbus>
</policy>
</monitors>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2030 >
2022-01-25 16:25:48 +00:00
Jonas Ådahl
3d4a6875e6
monitor-config-store: Add test for monitor configuration policy
...
The test aims to verify that setting the following policy
<policy>
<stores>
<store>system</store>
</stores>
</policy>
only applies monitor configurations from the system level.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2030 >
2022-01-25 16:25:48 +00:00
Jonas Ådahl
d8a66a3892
tests: Split out monitor configuration tests to its own test case
...
This makes it easier to run without having to run all the other tests,
and it will allow us to be more particular with its setup.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2030 >
2022-01-25 16:25:48 +00:00