mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
Merge branch 'headless-tests' into 'main'
Get the headless monitor test to work in ci See merge request GNOME/gtk!5915
This commit is contained in:
commit
81db6e9e61
@ -138,7 +138,8 @@ if [ $run == 1 ]; then
|
||||
echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
|
||||
${CMD} run \
|
||||
--rm \
|
||||
--volume "$(pwd)/..:/home/user/app" \
|
||||
--userns=keep-id \
|
||||
--volume "$(pwd)/..:/home/user/app:rw,z" \
|
||||
--workdir "/home/user/app" \
|
||||
--tty \
|
||||
--interactive "${TAG}" \
|
||||
|
@ -446,8 +446,10 @@ def dnd_tests():
|
||||
pointer_move(-100, -100)
|
||||
|
||||
launch_drag_source('abc')
|
||||
wait(100);
|
||||
|
||||
pointer_move(100, 100)
|
||||
wait(100);
|
||||
button_press(1)
|
||||
expect_button_press(button=1, x=100, y=100, timeout=300)
|
||||
# need to wait out the MIN_TIME_TO_DND
|
||||
@ -457,6 +459,7 @@ def dnd_tests():
|
||||
expect_drag(timeout=1000)
|
||||
|
||||
launch_drop_target()
|
||||
wait(100);
|
||||
button_release(1)
|
||||
expect_drop('abc', timeout=200)
|
||||
|
||||
|
@ -147,11 +147,11 @@ def run_commands():
|
||||
launch_observer()
|
||||
|
||||
add_monitor("0", width=100, height=100, scale=1, freq=60)
|
||||
expect_monitors_changed(0, 0, 1, 1000)
|
||||
expect_monitors_changed(0, 0, 1, 5000)
|
||||
expect_monitor (position=0, width=100, height=100, scale=1, freq=60000)
|
||||
|
||||
add_monitor("1", width=1024, height=768, scale=1, freq=144)
|
||||
expect_monitors_changed(1, 0, 1, 1000)
|
||||
expect_monitors_changed(1, 0, 1, 5000)
|
||||
expect_monitor (position=1, width=1024, height=768, scale=1, freq=144000)
|
||||
|
||||
remove_monitor("0")
|
||||
@ -171,6 +171,9 @@ def mutter_appeared(name):
|
||||
screen_cast = bus.get('org.gnome.Mutter.ScreenCast',
|
||||
'/org/gnome/Mutter/ScreenCast')
|
||||
run_commands()
|
||||
|
||||
if verbose:
|
||||
print ("Done running commands, exiting...")
|
||||
done = True
|
||||
|
||||
def mutter_vanished():
|
||||
|
@ -8,7 +8,7 @@ env.prepend('MESON_CURRENT_SOURCE_DIR', meson.current_source_dir())
|
||||
|
||||
test('monitor',
|
||||
find_program('run-headless-monitor-tests.sh', dirs: meson.current_source_dir()),
|
||||
suite: ['headless', 'failing'],
|
||||
suite: ['headless'],
|
||||
env: env,
|
||||
)
|
||||
|
||||
|
@ -11,16 +11,22 @@ export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
|
||||
|
||||
pipewire &
|
||||
pipewire_pid=\$!
|
||||
sleep 2
|
||||
|
||||
wireplumber &
|
||||
wireplumber_pid=\$!
|
||||
sleep 1
|
||||
sleep 2
|
||||
|
||||
# echo DBUS_SESSION_BUS_ADDRESS=\$DBUS_SESSION_BUS_ADDRESS
|
||||
# echo WAYLAND_DISPLAY=gtk-test
|
||||
|
||||
mutter --headless --no-x11 --wayland-display gtk-test >&mutter.log &
|
||||
export MUTTER_DEBUG=screen-cast
|
||||
|
||||
mutter --headless --no-x11 --wayland-display gtk-test &
|
||||
mutter_pid=\$!
|
||||
|
||||
sleep 2
|
||||
|
||||
export WAYLAND_DISPLAY=gtk-test
|
||||
export GDK_BACKEND=wayland
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user