diff --git a/Runner/suites/Connectivity/Bluetooth/BT_ON_FF/README.md b/Runner/suites/Connectivity/Bluetooth/BT_ON_FF/README.md deleted file mode 100644 index 1a159ec8..00000000 --- a/Runner/suites/Connectivity/Bluetooth/BT_ON_FF/README.md +++ /dev/null @@ -1,59 +0,0 @@ -Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. -SPDX-License-Identifier: BSD-3-Clause-Clear - -# Bluetooth Validation Test - -## Overview - -This test case validates the basic functionality of the Bluetooth controller on the device. It checks for: - -- Presence of `bluetoothctl` -- Running status of `bluetoothd` -- Power state toggling of the Bluetooth controller - -## Usage - -Instructions: - -1. Copy repo to Target Device: Use scp to transfer the scripts from the host to the target device. The scripts should be copied to any directory on the target device. -2. Verify Transfer: Ensure that the repo have been successfully copied to any directory on the target device. -3. Run Scripts: Navigate to the directory where these files are copied on the target device and execute the scripts as needed. - -Run a Connectivity Bluetooth test using: ---- -#### Quick Example -``` -git clone -cd -scp -r common Runner user@target_device_ip: -ssh user@target_device_ip -cd /Runner && ./run-test.sh Bluetooth -``` - -## Prerequisites -- bluez package must be installed (provides bluetoothctl) -- bluetoothd daemon must be running -- Root access may be required for complete validation - -## Result Format - -Test result will be saved in Bluetooth.res as: -#### Pass Criteria -- bluetoothctl is available -- bluetoothd is running -- Power on command returns success -- Bluetooth controller powered on successfully. – if all validations pass - -#### Fail Criteria -- bluetoothctl not found -- bluetoothd not running -- Power on command fails -- Failed to power on Bluetooth controller. – if any check fails - - -## Output -A .res file is generated in the same directory: - -`PASS Bluetooth` OR `FAIL Bluetooth` - - diff --git a/Runner/suites/Connectivity/Bluetooth/BT_ON_FF/run.sh b/Runner/suites/Connectivity/Bluetooth/BT_ON_FF/run.sh deleted file mode 100755 index ebb0af79..00000000 --- a/Runner/suites/Connectivity/Bluetooth/BT_ON_FF/run.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/sh - -# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries. -# SPDX-License-Identifier: BSD-3-Clause-Clear - -# Robustly find and source init_env -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -INIT_ENV="" -SEARCH="$SCRIPT_DIR" -while [ "$SEARCH" != "/" ]; do - if [ -f "$SEARCH/init_env" ]; then - INIT_ENV="$SEARCH/init_env" - break - fi - SEARCH=$(dirname "$SEARCH") -done - -if [ -z "$INIT_ENV" ]; then - echo "[ERROR] Could not find init_env (starting at $SCRIPT_DIR)" >&2 - exit 1 -fi - -if [ -z "$__INIT_ENV_LOADED" ]; then - # shellcheck disable=SC1090 - . "$INIT_ENV" -fi -# shellcheck disable=SC1090,SC1091 -. "$TOOLS/functestlib.sh" - -TESTNAME="BT_ON_FF" -test_path=$(find_test_case_by_name "$TESTNAME") || { - log_fail "$TESTNAME : Test directory not found." - echo "$TESTNAME FAIL" > "./$TESTNAME.res" - exit 1 -} - -cd "$test_path" || exit 1 -res_file="./$TESTNAME.res" -rm -f "$res_file" - -log_info "------------------------------------------------------------" -log_info "Starting $TESTNAME Testcase" -log_info "Checking dependency: bluetoothctl" - -# verify that all necessary dependencies -check_dependencies bluetoothctl pgrep - -log_info "Checking if bluetoothd is running..." -MAX_RETRIES=3 -RETRY_DELAY=5 -retry=0 - -while [ "$retry" -lt "$MAX_RETRIES" ]; do - if pgrep bluetoothd >/dev/null 2>&1; then - log_info "bluetoothd is running" - break - fi - log_warn "bluetoothd not running, retrying in ${RETRY_DELAY}s..." - sleep "$RETRY_DELAY" - retry=$((retry + 1)) -done - -if [ "$retry" -eq "$MAX_RETRIES" ]; then - log_fail "Bluetooth daemon not detected after ${MAX_RETRIES} attempts." - echo "$TESTNAME FAIL" > "$res_file" - exit 1 -fi - -log_info "Powering off Bluetooth controller..." -poweroff_output=$(bluetoothctl power off 2>&1) -if echo "$poweroff_output" | grep -q "Changing power off succeeded"; then - log_pass "Bluetooth powered off successfully" -else - log_warn "Power off result: $poweroff_output" - log_fail "Bluetooth power off failed" - echo "$TESTNAME FAIL" > "$res_file" - exit 1 -fi - -log_info "Powering on Bluetooth controller..." -poweron_output=$(bluetoothctl power on 2>&1) -if echo "$poweron_output" | grep -q "Changing power on succeeded"; then - log_pass "Bluetooth powered on successfully" - echo "$TESTNAME PASS" > "$res_file" - exit 0 -else - log_warn "Power on result: $poweron_output" - log_fail "Bluetooth power on failed" - echo "$TESTNAME FAIL" > "$res_file" - exit 1 -fi -