Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: export dbus session address to squishrunner context #63

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions fedora/src/startup/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ export SQUISH_NO_CRASHHANDLER=1

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

# set DBUS_SESSION_BUS_ADDRESS for squishrunner terminal session
DBUS_SESSION_FILE=/tmp/dbus_env.sh
if [ -f $DBUS_SESSION_FILE ]; then
source $DBUS_SESSION_FILE
else
timeout=10 # seconds
echo "[ERROR] 'DBUS_SESSION_BUS_ADDRESS' not set. Waiting for $timeout seconds..."
sleep $timeout
if [ -f $DBUS_SESSION_FILE ]; then
echo "[TIMEOUT] 'DBUS_SESSION_BUS_ADDRESS' still not set after $timeout seconds. Exiting..."
exit 1
fi
source $DBUS_SESSION_FILE
fi

# squishrunner waits itself for a license to become available, but fails with error 37 if it cannot connect to the license server
LICENSE_ERROR_RESULT_CODE=37
result=LICENSE_ERROR_RESULT_CODE
Expand Down
3 changes: 3 additions & 0 deletions fedora/src/startup/vnc_startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ gnome-keyring-daemon --start --components=pkcs11,secrets,ssh
echo -n "${VNC_PW}" | gnome-keyring-daemon -r --unlock
gnome-keyring-daemon -d --login

# save dbus session address
echo "export DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}" >> /tmp/dbus_env.sh

startxfce4 &
EOF
fi
Expand Down