Skip to content

Commit

Permalink
tests: update offline test
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Nov 29, 2024
1 parent faf8d19 commit 872d454
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/test_offline.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env sh

tmp=$(mktemp)
name=$(curl -L "https://api.github.com/repos/Open-Wine-Components/umu-proton/releases/latest" | jq .assets[1].name | tr -d '"')

# Ensure the Proton directory doesn't exist
Expand All @@ -22,4 +23,13 @@ cp -a SteamLinuxRuntime_sniper/* "$HOME"/.local/share/umu
mv "$HOME"/.local/share/umu/_v2-entry-point "$HOME"/.local/share/umu/umu

# Run offline using bwrap
UMU_LOG=debug GAMEID=umu-0 bwrap --unshare-net --bind / / --dev /dev --bind "$HOME" "$HOME" -- "$HOME/.local/bin/umu-run" wineboot -u
# TODO: Figure out why the command exits with a 127 when offline. The point
# is that we're able to enter the container and we do not crash. For now,
# just query a string that shows that session was offline
UMU_LOG=debug GAMEID=umu-0 bwrap --unshare-net --bind / / --dev /dev --bind "$HOME" "$HOME" -- "$HOME/.local/bin/umu-run" wineboot -u 2> "$tmp"

# Check if we exited. If we logged this statement then there were no errors
# before entering the container
grep "exited with wait status" "$tmp"
# Check if we were offline
grep "unreachable" "$tmp"

0 comments on commit 872d454

Please sign in to comment.