Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add e2e test for file lock
Browse files Browse the repository at this point in the history
R1kaB3rN committed Dec 25, 2024
1 parent f406f53 commit 19061fd
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/test_flock.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env sh

#
# Ensure umu-launcher does not download its fetched resources more than once
# when multiple processes of itself are created
#

tmp1=$(mktemp)
tmp2=$(mktemp)

UMU_LOG=debug GAMEID=umu-0 "$HOME/.local/bin/umu-run" wineboot -u 2> "$tmp1" &
sleep 1
UMU_LOG=debug GAMEID=umu-0 "$HOME/.local/bin/umu-run" wineboot -u 2> "$tmp2" &
wait

grep "exited with wait status" "$tmp1"

# Ensure the 2nd proc didn't download the runtime
grep "\(latest\), please wait..." "$tmp2"
if [ $? -ne 0 ]; then
exit 1
fi

grep "exited with wait status" "$tmp2"

# Ensure the 2nd proc didn't download Proton
grep "Downloading" "$tmp2"
if [ $? -ne 0 ]; then
exit 1
fi

0 comments on commit 19061fd

Please sign in to comment.