Commit 592f434d authored by Carles Cufi's avatar Carles Cufi Committed by Anas Nashif
Browse files

Revert "Bluetooth: tests: bsim: host/adv/resume2"

This reverts commit d00cdf98.

Signed-off-by: default avatarCarles Cufi <carles.cufi@nordicsemi.no>
parent 1497104d
Loading
Loading
Loading
Loading
+0 −3
Changes for tests/bsim/bluetooth/host/adv/compile.sh: 0 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -21,9 +21,6 @@ source ${ZEPHYR_BASE}/tests/bsim/compile.source

app=tests/bsim/bluetooth/host/adv/resume compile
app=tests/bsim/bluetooth/host/adv/resume conf_file=prj_2.conf compile
app=tests/bsim/bluetooth/host/adv/resume2/connectable compile
app=tests/bsim/bluetooth/host/adv/resume2/connecter compile
app=tests/bsim/bluetooth/host/adv/resume2/dut compile
app=tests/bsim/bluetooth/host/adv/chain compile
app=tests/bsim/bluetooth/host/adv/extended conf_file=prj_advertiser.conf compile
app=tests/bsim/bluetooth/host/adv/extended conf_file=prj_scanner.conf compile
+0 −24
Changes for tests/bsim/bluetooth/host/adv/resume2/_build.sh: 0 added lines, 24 removed lines.
Original line number Diff line number Diff line
#!/usr/bin/env bash

# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

set -eu
dotslash="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"

cd "${dotslash}"

(
	cd connecter/
	./_build.sh
)

(
	cd connectable/
	./_build.sh
)

(
	cd dut/
	./_build.sh
)
+0 −21
Changes for tests/bsim/bluetooth/host/adv/resume2/connectable/CMakeLists.txt: 0 added lines, 21 removed lines.
Original line number Diff line number Diff line
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
project(app)

target_sources(app PRIVATE
  main.c
)

zephyr_include_directories(
  ${BSIM_COMPONENTS_PATH}/libPhyComv1/src/
  ${BSIM_COMPONENTS_PATH}/libUtilv1/src/
)

add_subdirectory(${ZEPHYR_BASE}/tests/bluetooth/common/testlib testlib)
target_link_libraries(app PRIVATE
  testlib
)
+0 −17
Changes for tests/bsim/bluetooth/host/adv/resume2/connectable/_build.sh: 0 added lines, 17 removed lines.
Original line number Diff line number Diff line
#!/usr/bin/env bash

# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

set -eu
dotslash="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
bin_dir="${BSIM_OUT_PATH}/bin"
BOARD="${BOARD:-nrf52_bsim}"

cd "${dotslash}"

compile_path="${bin_dir}/bs_${BOARD}_"
compile_path+="$(realpath --relative-to "$(west topdir)"/zephyr prj.conf | tr /. _)"

west build -b nrf52_bsim
cp -v build/zephyr/zephyr.exe "${compile_path}"
+0 −47
Changes for tests/bsim/bluetooth/host/adv/resume2/connectable/main.c: 0 added lines, 47 removed lines.
Original line number Diff line number Diff line
/* Copyright (c) 2024 Nordic Semiconductor ASA
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/conn.h>
#include <zephyr/sys/__assert.h>

#include <testlib/adv.h>
#include <testlib/conn.h>

/* @file
 *
 * This app advertises connectable with the name "connectable".
 * It only receives one connection at a time. When the remote
 * disconnects, it starts advertising again.
 *
 * This app is added to the simulation simply to be a target for
 * a connection from the DUT.
 */

int main(void)
{
	int err;

	err = bt_enable(NULL);
	__ASSERT_NO_MSG(!err);

	err = bt_set_name("connectable");
	__ASSERT_NO_MSG(!err);

	while (true) {
		struct bt_conn *conn = NULL;

		bt_testlib_conn_wait_free();

		err = bt_testlib_adv_conn(
			&conn, BT_ID_DEFAULT,
			(BT_LE_ADV_OPT_USE_NAME | BT_LE_ADV_OPT_FORCE_NAME_IN_AD));
		__ASSERT_NO_MSG(!err);

		bt_testlib_wait_disconnected(conn);
		bt_testlib_conn_unref(&conn);
	}

	return 0;
}
Loading