mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-18 23:07:27 +02:00
fix(single-instance): propagate D-Bus setup and handoff errors (#3584)
* fix(single-instance): propagate D-Bus setup and handoff errors * chore: satisfy release metadata and test header checks * fix(single-instance): launch normally without a D-Bus session bus Log a warning instead of failing setup when the session bus is unreachable, and add context to handoff errors. * ci: run the single-instance D-Bus test under dbus-run-session Run it in test-rust on Linux and keep it out of the updater integration job, which has no session bus. --------- Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
1 parent
6a263bec1c
commit
f83c5d3b0f
6 files changed
+237
-13
No files matched your search
@@ -137,4 +137,6 @@ jobs:
|
||||
# about a minute linking each of those builds. None of it matters to the updater.
|
||||
CARGO_PROFILE_RELEASE_LTO: 'false'
|
||||
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: '16'
|
||||
run: cargo test --test '*' -- --ignored
|
||||
# The single-instance D-Bus test is also ignored by default, but needs a session bus and
|
||||
# runs in test-rust.yml instead.
|
||||
run: cargo test --workspace --exclude tauri-plugin-single-instance --test '*' -- --ignored
|
||||
@@ -111,7 +111,7 @@ jobs:
|
||||
if: contains(matrix.platform.target, 'unknown-linux')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev dbus
|
||||
|
||||
- uses: dtolnay/rust-toolchain@1.90
|
||||
with:
|
||||
@@ -174,6 +174,11 @@ jobs:
|
||||
# Only on the platforms we actually test on, since cargo skips doc tests when cross compiling.
|
||||
elif [ "$COMMAND" = test ] && ! $RUNNER test --doc --package "$package" --target "$TARGET" "${features[@]}"; then
|
||||
failed+=("$package (doc tests)")
|
||||
# The D-Bus test is ignored by default because it needs its own session bus, and it
|
||||
# is compiled out with `--all-features` (the `semver` feature changes the bus name).
|
||||
elif [ "$package" = tauri-plugin-single-instance ] && [ "$COMMAND" = test ] && [[ "$TARGET" == *-linux-* ]] \
|
||||
&& ! dbus-run-session -- $RUNNER test --package "$package" --target "$TARGET" --test dbus_errors -- --ignored; then
|
||||
failed+=("$package (D-Bus tests)")
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
Reference in new issue
Block a user