pipewire/.gitlab/ci/setup-fedora-container.sh
Pauli Virtanen db5cb6515a ci: use ASan/UBsan in bluetooth tests
Compile with sanitizers for the bluetooth tests, for better backtraces
on failures. Also produce backtraces via gdb.
2026-05-11 08:15:29 +00:00

34 lines
847 B
Bash
Executable file

#!/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 --enable-asan --enable-ubsan --enable-debug
# 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_VERSION"
curl -L "$BZIMAGE_URL" -o bzImage
cd /
# Cleanup
rm -rf /bluez-build