Add back the tests for OSCI.

Resolves: RHEL-18429

Signed-off-by: David Marlin <dmarlin@redhat.com>
This commit is contained in:
David Marlin 2024-06-04 23:37:07 -05:00
parent ad7639dde9
commit 7569eccd1d
2 changed files with 44 additions and 0 deletions

35
tests/run_tests.sh Executable file
View File

@ -0,0 +1,35 @@
#!/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 bccmd present and doesn't fail if called
#bccmd --help
# Is btattach present and doesn't fail if called
btattach --version
# Is ciptool present and doesn't fail if called
ciptool --help
# hciattach test
any_str=$(hciattach -l | grep -E "^any")
if [ "$any_str" != "any 0x0000,0x0000" ]
then
echo "Unable to find the 'any' hciattach configuration"
exit 99
fi
# Is hciconfig present and doesn't fail if called
hciconfig --help
# Is hcitool present and doesn't fail if called
hcitool --help
# Is rfcomm present and doesn't fail if called
rfcomm --help
# Is sdptool present and doesn't fail if called
sdptool --help

9
tests/tests.yml Normal file
View File

@ -0,0 +1,9 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
tests:
- simple:
dir: . # switch to subfolder. This parameter is REQUIRED, use `dir: .` for current folder
run: ./run_tests.sh # this is your test command, its exit code is the outcome of the test