From 022e94ab9b90813112e738236d35d45e8c76f185 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 11 Feb 2025 16:18:29 +0100 Subject: [PATCH] Add OSCI tests Resolves: RHEL-77171 --- .fmf/version | 1 + bluez.spec | 6 +++++- tests/run_tests.sh | 30 ++++++++++++++++++++++++++++++ tests/tests.fmf | 5 +++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .fmf/version create mode 100755 tests/run_tests.sh create mode 100644 tests/tests.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/bluez.spec b/bluez.spec index 55639d7..840aacd 100644 --- a/bluez.spec +++ b/bluez.spec @@ -6,7 +6,7 @@ Name: bluez Version: 5.77 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Bluetooth utilities License: GPL-2.0-or-later URL: http://www.bluez.org/ @@ -339,6 +339,10 @@ install emulator/btvirt ${RPM_BUILD_ROOT}/%{_libexecdir}/bluetooth/ %{_userunitdir}/obex.service %changelog +* Tue Feb 11 2025 Bastien Nocera - 5.77-7 +- Add OSCI tests +- Resolves: RHEL-77171 + * Mon Feb 10 2025 Bastien Nocera - 5.77-6 - Fix config not being applied - Resolves: RHEL-78405 diff --git a/tests/run_tests.sh b/tests/run_tests.sh new file mode 100755 index 0000000..d0d79e7 --- /dev/null +++ b/tests/run_tests.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -ex + +# This test is designed such that a Bluetooth controller is not required but we +# can at least check to make sure the commands are installed correctly + +# Is bluemoon present and doesn't fail if called +bluemoon --help + +# Is bluetoothctl present and doesn't fail if called +# FIXME: https://issues.redhat.com/browse/RHEL-56073 +# bluetoothctl --help + +# Is btattach present and doesn't fail if called +btattach --version + +# Is btmgmt present and doesn't fail if called +# FIXME: https://issues.redhat.com/browse/RHEL-56073 +# btmgmt --help + +# Is btmon present and doesn't fail if called +btmon --help + +# Is hex2hcd present and doesn't fail if called +hex2hcd --help + +# Is mpris-proxy present and doesn't fail if called +mpris-proxy --help + diff --git a/tests/tests.fmf b/tests/tests.fmf new file mode 100644 index 0000000..c29bff7 --- /dev/null +++ b/tests/tests.fmf @@ -0,0 +1,5 @@ +summary: Check basic command line options +discover: + how: shell +execute: + script: tests/run_tests.sh