Skip to content

Commit

Permalink
Merge pull request #308 from jat001/patch-1
Browse files Browse the repository at this point in the history
guess the xorg path in tests
  • Loading branch information
matt335672 authored Apr 23, 2024
2 parents 43a3256 + d0ec07d commit 4c25520
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions tests/xorg-test-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,30 @@

# Test that Xorg can load the compiled modules

FindXorg()
{
set -- \
/usr/local/libexec/Xorg \
/usr/libexec/Xorg \
/usr/lib/xorg/Xorg \
/usr/lib/Xorg \
/usr/bin/Xorg

for path in "$@"; do
if [ -x "$path" ]; then
echo "$path"
exit
fi
done

if [ -z "$XORG" ]; then
echo 'Xorg'
fi
}

# X server to run
if [ -z "$XORG" ]; then
if [ -x /usr/lib/xorg/Xorg ]; then
# Don't use the Ubuntu wrapped server
XORG=/usr/lib/xorg/Xorg
else
XORG=Xorg
fi
XORG=`FindXorg`
fi

# Client to connect to Xorg
Expand Down

0 comments on commit 4c25520

Please sign in to comment.