Skip to content

Commit ee557d4

Browse files
committed
build: expose dbus session address to squishrunner context
1 parent 7b32a64 commit ee557d4

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

fedora/src/startup/entrypoint.sh

+15
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,21 @@ export SQUISH_NO_CRASHHANDLER=1
4040

4141
(/home/headless/squish/bin/squishserver >>"${GUI_TEST_REPORT_DIR}"/serverlog.log 2>&1) &
4242

43+
# set DBUS_SESSION_BUS_ADDRESS for squishrunner terminal session
44+
DBUS_SESSION_FILE=/tmp/dbus_env.sh
45+
if [ -f $DBUS_SESSION_FILE ]; then
46+
source $DBUS_SESSION_FILE
47+
else
48+
timeout=10 # seconds
49+
echo "[ERROR] 'DBUS_SESSION_BUS_ADDRESS' not set. Waiting for $timeout seconds..."
50+
sleep $timeout
51+
if [ -f $DBUS_SESSION_FILE ]; then
52+
echo "[TIMEOUT] 'DBUS_SESSION_BUS_ADDRESS' still not set after $timeout seconds. Exiting..."
53+
exit 1
54+
fi
55+
source $DBUS_SESSION_FILE
56+
fi
57+
4358
# squishrunner waits itself for a license to become available, but fails with error 37 if it cannot connect to the license server
4459
LICENSE_ERROR_RESULT_CODE=37
4560
result=LICENSE_ERROR_RESULT_CODE

fedora/src/startup/vnc_startup.sh

+3
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
106106
echo -n "${VNC_PW}" | gnome-keyring-daemon -r --unlock
107107
gnome-keyring-daemon -d --login
108108
109+
# save dbus session address
110+
echo "export DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >> /tmp/dbus_env.sh
111+
109112
startxfce4 &
110113
EOF
111114
fi

0 commit comments

Comments
 (0)