2.51.90
[platform/upstream/at-spi2-core.git] / ci / run-tests.sh
1 #!/bin/sh
2
3 set -eu
4
5 echo "About to run the tests.  First we'll launch a gnome-session DBus mock."
6
7 python3 -m dbusmock --session org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager &
8
9 gdbus wait --session --timeout 10 org.gnome.SessionManager
10
11 gdbus call --session \
12       --dest org.gnome.SessionManager \
13       --object-path /org/gnome/SessionManager \
14       --method org.freedesktop.DBus.Mock.AddTemplate 'tests/dbusmock/mock-gnome-session.py' '{}'
15
16 echo "Launching the accessibility bus by calling GetAddress:"
17
18 gdbus call --session --dest org.a11y.Bus --object-path /org/a11y/bus --method org.a11y.Bus.GetAddress
19
20 ps auxwww
21
22 echo "Setting the mock session to the running state"
23
24 gdbus call --session \
25       --dest org.gnome.SessionManager \
26       --object-path /org/gnome/SessionManager \
27       --method org.freedesktop.DBus.Mock.SetSessionRunning true
28
29 echo "Now running the tests:"
30
31 meson test -C _build --print-errorlogs
32
33 echo "Telling the mock session to logout so the a11y daemons will exit"
34
35 gdbus call --session \
36       --dest org.gnome.SessionManager \
37       --object-path /org/gnome/SessionManager \
38       --method org.gnome.SessionManager.Logout 0
39
40 ps auxwww