-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bluetooth: controller: mocks as a library
specify the mocks and the helper routines as a library instead of adding them to the file list Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
- Loading branch information
Showing
22 changed files
with
140 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# | ||
# CMakeLists.txt file for creating of mocks library. | ||
# | ||
|
||
add_library(common STATIC | ||
src/helper_pdu.c | ||
src/helper_util.c | ||
) | ||
|
||
target_include_directories(common PUBLIC | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/common/include | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/include | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/util | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller | ||
${ZEPHYR_BASE}/subsys/bluetooth | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic/lll | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic | ||
${ZEPHYR_BASE}/include/zephyr/bluetooth | ||
|
||
) | ||
|
||
target_link_libraries(common PRIVATE test_interface) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# Common include directories and source files for bluetooth unit tests | ||
# | ||
|
||
include_directories( | ||
src | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/include | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/common/include | ||
${ZEPHYR_BASE}/include/zephyr/bluetooth | ||
${ZEPHYR_BASE}/subsys/bluetooth | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/util | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/include | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic/lll | ||
) | ||
|
||
FILE(GLOB unit_sources | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/util/mem.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/util/memq.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_chan.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_tx_queue.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_llcp_local.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_llcp_remote.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_llcp_pdu.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_llcp_common.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_llcp_phy.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_llcp_enc.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_llcp_conn_upd.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_llcp_chmu.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_llcp_cc.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_llcp.c | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/ull_conn.c | ||
) | ||
|
||
add_definitions(-include ztest.h) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# | ||
# CMakeLists.txt file for creating of mocks library. | ||
# | ||
|
||
add_library(mocks STATIC | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/kernel.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/ecb.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/mayfly.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/lll.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/lll_conn.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/ll_assert.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/assert.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/util.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/ticker.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/ull.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/ull_conn_iso.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/ull_peripheral.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/ull_peripheral_iso.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/ull_central.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/ull_scan.c | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/src/lll_clock.c | ||
) | ||
|
||
|
||
target_include_directories(mocks PUBLIC | ||
${ZEPHYR_BASE}/tests/bluetooth/controller/mock_ctrl/include | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/include | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/util | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller | ||
${ZEPHYR_BASE}/subsys/bluetooth | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic/lll | ||
${ZEPHYR_BASE}/subsys/bluetooth/controller/ll_sw/nordic | ||
${ZEPHYR_BASE}/include/zephyr/bluetooth | ||
|
||
) | ||
|
||
target_link_libraries(mocks PRIVATE test_interface) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
*/ | ||
|
||
#include <zephyr/types.h> | ||
#include <zephyr/ztest.h> | ||
#include <soc.h> | ||
|
||
#include "hal/debug.h" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
*/ | ||
|
||
#include <zephyr/types.h> | ||
#include <zephyr/ztest.h> | ||
|
||
#include "ticker/ticker.h" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
*/ | ||
|
||
#include <zephyr/types.h> | ||
#include <zephyr/ztest.h> | ||
|
||
#include <zephyr/bluetooth/hci.h> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters