Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
run: cmake --build build --parallel 2
- name: Test
run: ctest --test-dir build --output-on-failure --parallel 2
- name: Application QML startup smoke
shell: bash
run: dbus-run-session -- bash tests/ApplicationStartupSmoke.sh "$PWD/build/ryofiles"
- name: FileChooser D-Bus smoke
shell: bash
run: dbus-run-session -- bash tests/FileChooserPortalSmoke.sh "$PWD/build/ryofiles"
Expand Down
1 change: 0 additions & 1 deletion qml/components/GitDiffPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ Item {
selectedTextColor: Ryoku.inkOnBone
font.family: Ryoku.monoFont
font.pixelSize: 10 * root.uiScale
lineHeight: 1.25
}
}
}
Expand Down
55 changes: 55 additions & 0 deletions tests/ApplicationStartupSmoke.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-only
set -euo pipefail

if [[ $# -ne 1 ]]; then
echo "usage: $0 /path/to/ryofiles" >&2
exit 2
fi

binary="$1"
[[ -x "$binary" ]] || { echo "not executable: $binary" >&2; exit 2; }

workdir="$(mktemp -d)"
trap 'rm -rf "$workdir"' EXIT
mkdir -p "$workdir/home" "$workdir/runtime" "$workdir/config" "$workdir/cache" "$workdir/data"
chmod 700 "$workdir/runtime"

set +e
output="$(
HOME="$workdir/home" \
XDG_RUNTIME_DIR="$workdir/runtime" \
XDG_CONFIG_HOME="$workdir/config" \
XDG_CACHE_HOME="$workdir/cache" \
XDG_DATA_HOME="$workdir/data" \
QT_QPA_PLATFORM=offscreen \
QT_QUICK_BACKEND=software \
timeout 4s "$binary" 2>&1
)"
status=$?
set -e

printf '%s\n' "$output"

if grep -Fq "QQmlApplicationEngine failed to load component" <<<"$output"; then
echo "QML application engine failed to load the root component" >&2
exit 1
fi

if grep -Fq "Type " <<<"$output" && grep -Fq " unavailable" <<<"$output"; then
echo "QML type dependency was unavailable during startup" >&2
exit 1
fi

if grep -Fq "Cannot assign to non-existent property" <<<"$output"; then
echo "QML assigned a non-existent property during startup" >&2
exit 1
fi

# A healthy GUI process is expected to remain alive until timeout in this headless smoke.
if [[ $status -ne 124 ]]; then
echo "Ryofiles exited unexpectedly during startup smoke (status=$status)" >&2
exit 1
fi

echo "Ryofiles root QML instantiated successfully"
Loading