ci: run bluetooth VM tests

The bluetooth VM tests require building BlueZ (specific version is
better than relying on FDO image version) and building pytest-bluezenv.

Build them and cache the results.
This commit is contained in:
Pauli Virtanen 2026-05-08 23:00:29 +03:00 committed by Wim Taymans
parent d12367e10e
commit 1fc7ec2e3f
2 changed files with 86 additions and 5 deletions

View file

@ -0,0 +1,34 @@
#!/bin/sh
set -ex
BLUEZ_COMMIT=$1
PYTEST_BLUEZENV_VERSION=$2
BZIMAGE_URL=$3
COMPILE_ARGS=
if [ -n "$FDO_CI_CONCURRENT" ]; then
COMPILE_ARGS="-j$FDO_CI_CONCURRENT"
fi
# Build BlueZ snapshot for bluetooth VM testing
git clone --depth 1 --revision "$BLUEZ_COMMIT" https://github.com/bluez/bluez.git /bluez-build
cd /bluez-build
./bootstrap
./configure --enable-tools --disable-obex
# shellcheck disable=SC2086
make $COMPILE_ARGS
cd /
# Store bluetooth VM testing tools
mkdir /bluez /bluez/client /bluez/tools /bluez/src
cp /bluez-build/client/bluetoothctl /bluez/client/
cp /bluez-build/tools/btmgmt /bluez/tools/
cp /bluez-build/src/bluetoothd /bluez/src/
cd /bluez
python3 -m pip wheel --no-deps "pytest-bluezenv==$PYTEST_BLUEZENV_VERSION"
curl -L "$BZIMAGE_URL" -o bzImage
cd /
# Cleanup
rm -rf /bluez-build