From d5d3ac742793ef75388bcca35c7075b8e3003069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Battrel?= Date: Wed, 4 Dec 2024 15:09:14 +0100 Subject: [PATCH] Tests: Bluetooth: Build Host with different configurations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The new `host_config_variants` goal is to be able to test specific set of configurations when building the Host without the need of having a specific application for it. The first test check that the Host build correctly with `CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY` enabled. Signed-off-by: Théo Battrel --- .../host_config_variants/CMakeLists.txt | 8 ++++++++ tests/bluetooth/host_config_variants/prj.conf | 1 + tests/bluetooth/host_config_variants/src/empty.c | 10 ++++++++++ .../bluetooth/host_config_variants/testcase.yaml | 16 ++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 tests/bluetooth/host_config_variants/CMakeLists.txt create mode 100644 tests/bluetooth/host_config_variants/prj.conf create mode 100644 tests/bluetooth/host_config_variants/src/empty.c create mode 100644 tests/bluetooth/host_config_variants/testcase.yaml diff --git a/tests/bluetooth/host_config_variants/CMakeLists.txt b/tests/bluetooth/host_config_variants/CMakeLists.txt new file mode 100644 index 00000000000..2e67a779e3f --- /dev/null +++ b/tests/bluetooth/host_config_variants/CMakeLists.txt @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.20.0) + +find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) +project(host_config_variants) + +target_sources(app PRIVATE src/empty.c) diff --git a/tests/bluetooth/host_config_variants/prj.conf b/tests/bluetooth/host_config_variants/prj.conf new file mode 100644 index 00000000000..9c56e28779b --- /dev/null +++ b/tests/bluetooth/host_config_variants/prj.conf @@ -0,0 +1 @@ +CONFIG_BT=y diff --git a/tests/bluetooth/host_config_variants/src/empty.c b/tests/bluetooth/host_config_variants/src/empty.c new file mode 100644 index 00000000000..e7a6fc5f964 --- /dev/null +++ b/tests/bluetooth/host_config_variants/src/empty.c @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor + * + * SPDX-License-Identifier: Apache-2.0 + */ + +int main(void) +{ + return 0; +} diff --git a/tests/bluetooth/host_config_variants/testcase.yaml b/tests/bluetooth/host_config_variants/testcase.yaml new file mode 100644 index 00000000000..666057de068 --- /dev/null +++ b/tests/bluetooth/host_config_variants/testcase.yaml @@ -0,0 +1,16 @@ +tests: + # Test that the Host builds with BT_SMP_OOB_LEGACY_PAIR_ONLY enabled + bluetooth.host_config_variants.config_bt_smp_oob_legacy_pair_only: + extra_configs: + - CONFIG_BT_SMP=y + - CONFIG_BT_PERIPHERAL=y + - CONFIG_BT_SMP_SC_PAIR_ONLY=n + - CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY=y + platform_allow: + - native_sim + - native_sim/native/64 + integration_platforms: + - native_sim + tags: + - bluetooth + build_only: true