zephyr/tests/bluetooth/bsim_bt/edtt_ble_test_app
Torsten Rasmussen 407b49b35c cmake: use find_package to locate Zephyr
Using find_package to locate Zephyr.

Old behavior was to use $ENV{ZEPHYR_BASE} for inclusion of boiler plate
code.

Whenever an automatic run of CMake happend by the build system / IDE
then it was required that ZEPHYR_BASE was defined.
Using ZEPHYR_BASE only to locate the Zephyr package allows CMake to
cache the base variable and thus allowing subsequent invocation even
if ZEPHYR_BASE is not set in the environment.

It also removes the risk of strange build results if a user switchs
between different Zephyr based project folders and forgetting to reset
ZEPHYR_BASE before running ninja / make.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2020-03-27 16:23:46 +01:00
..
common Bluetooth: tests: Fix typo'd CONFIG_ARCH_POSIX in comment 2020-01-10 09:37:47 +01:00
gatt_test_app cmake: use find_package to locate Zephyr 2020-03-27 16:23:46 +01:00
hci_test_app cmake: use find_package to locate Zephyr 2020-03-27 16:23:46 +01:00
tests_scripts Bluetooth: EDTT: Enable disabled tests 2020-02-17 19:03:12 +02:00
README.txt

README.txt

Intro
#####

This is the embedded side of the BLE conformance tests which are part of the
EDTT (Embedded Device Test Tool).

Much more info about the tool can be found in https://github.com/EDTTool/EDTT
and in its `doc/` folder.

In very short, there is 2 applications in this folder:
1.) A controller only build of the BLE stack, where the HCI, and a few extra
    interfaces are exposed to the EDTT.
2.) An application which implements the test GATT services specified by BT SIG
    in GATT_Test_Databases.xlsm, with an EDTT interface which allows the EDTT
    tests to switch between theses.

The first application is used for LL and HCI conformance tests of the
controller.
The second application for GATT tests.

These 2 particular applications are meant to be used in a simulated environment,
for regression, either as part of a CI system, or in workstation during
development.
This is due to this particular application only containing an EDTT transport
driver for simulated targets, meant to connect to the `bsim` EDTT transport
driver thru the EDTT bridge.

How to use it
#############

Assuming you have already
`installed BabbleSim <https://babblesim.github.io/fetching.html>`_.

Add to your environment the variable EDTT_PATH poitining to the
EDTT folder. You can do this by adding it to your `~/.bashrc`, `~/.zephyrrc`,
or similar something like:
```
export EDTT_PATH=${ZEPHYR_BASE}/../tools/edtt/
```
(if you add it to your .bashrc you probably won't be able to refer to
ZEPHYR_BASE)

To run these sets of tests you need to compile both of these applications as any
other Zephyr app, targeting the nrf52_bsim.
To compile both in an automated way you can just use the `compile.sh` (see
below).

To run the tests you can either run one of the provided scripts, or run by
hand the BabbleSim 2G4 Phy, EDTT bridge, EDTT and needed simulated devices.
The shortest path is to use the provided scripts.

In short the whole process being:
```
cd ${ZEPHYR_BASE} && source zephyr-env.sh
#Compile all apps:
WORK_DIR=${ZEPHYR_BASE}/bsim_bt_out tests/bluetooth/bsim_bt/compile.sh

#run all tests
RESULTS_FILE=${ZEPHYR_BASE}/banana.xml SEARCH_PATH=tests/bluetooth/bsim_bt/edtt_ble_test_app/ tests/bluetooth/bsim_bt/run_parallel.sh

#or just run one set:
tests/bluetooth/bsim_bt/edtt_ble_test_app/tests_scripts/hci.sh
```