Fix Bluetooth discovery so scanned devices are listed
This commit is contained in:
1 parent
5d859d7b11
commit
6a6222c198
9 files changed
+276
-7
No files matched your search
@@ -1158,6 +1158,28 @@ if [ -x "$BASE_DIR/scripts/test-idle-blank-lock.py" ] && \
|
||||
fail "host idle-blank screenlock integration test failed"
|
||||
fi
|
||||
|
||||
echo "[check] Bluetooth scan stream parsing..."
|
||||
NET_SRC="$BASE_DIR/src/dwm-plugins/networks_plugin.cpp"
|
||||
NET_SO="$BASE_DIR/prebuilt/sxmo-x11/usr/lib/dwm/plugins/networks.so"
|
||||
for token in 'parseBtScanDevices' 'queryBtDevices(const std::string& scanRaw' \
|
||||
'queryBtDevices(scanRaw)' 'bluetoothctl power on' \
|
||||
'scan on 2>/dev/null'; do
|
||||
if ! grep -qF "$token" "$NET_SRC"; then
|
||||
fail "networks_plugin.cpp is missing the Bluetooth scan fix: $token"
|
||||
fi
|
||||
done
|
||||
if ! strings "$NET_SO" 2>/dev/null | \
|
||||
grep -qF 'timeout 16 bluetoothctl --timeout 15 scan on'; then
|
||||
fail "shipped networks.so is stale: rebuild with scripts/build-sxmo-x11.sh"
|
||||
fi
|
||||
if [ ! -x "$BASE_DIR/scripts/test-bluetooth-scan.py" ]; then
|
||||
fail "missing host unit test scripts/test-bluetooth-scan.py"
|
||||
fi
|
||||
if command -v g++ >/dev/null 2>&1 && \
|
||||
! "$BASE_DIR/scripts/test-bluetooth-scan.py" >/dev/null 2>&1; then
|
||||
fail "host Bluetooth scan parser test failed"
|
||||
fi
|
||||
|
||||
if [ "$FAILURES" -ne 0 ]; then
|
||||
echo "[check] $FAILURES check(s) failed."
|
||||
exit 1
|
||||
|
||||
Reference in new issue
Block a user