diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/tests/run_tests.sh b/tests/run_tests.sh new file mode 100644 index 0000000..6c5ffcf --- /dev/null +++ b/tests/run_tests.sh @@ -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 diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..b83c0a1 --- /dev/null +++ b/tests/tests.yml @@ -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