Skip to content

Commit abacf8c

Browse files
tests: on_target: update readme
Readme needs an update due to latest changes. Signed-off-by: Giacomo Dematteis <[email protected]>
1 parent 6073a2f commit abacf8c

File tree

1 file changed

+35
-27
lines changed

1 file changed

+35
-27
lines changed

tests/on_target/README.md

Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,73 +2,81 @@
22

33
## Run test locally
44

5+
NOTE: The tests have been tested on Ubuntu 22.04. For details on how to install Docker please refer to the Docker documentation https://docs.docker.com/engine/install/ubuntu/
6+
57
### Setup docker
68
```shell
79
docker pull ghcr.io/hello-nrfcloud/firmware:docker-v1.0.3
810
cd <path_to_oob_dir>
9-
west build -p -b thingy91x/nrf9151/ns app
10-
cp build/merged.hex tests/on_target/artifacts/hello.nrfcloud.com-aaa000-thingy91x-nrf91.hex
1111
docker run --rm -it \
1212
--privileged \
1313
-v /dev:/dev:rw \
1414
-v /run/udev:/run/udev \
1515
-v .:/work/thingy91x-oob \
16-
-v /opt/setup-jlink:/opt/setup-jlink \
1716
ghcr.io/hello-nrfcloud/firmware:docker-v1.0.3 \
1817
/bin/bash
18+
cd thingy91x-oob/tests/on_target
1919
```
2020

21-
NOTE: The tests have been tested on Ubuntu 22.04. For details on how to install Docker please refer to the Docker documentation https://docs.docker.com/engine/install/ubuntu/
22-
2321
### Verify nrfutil/jlink works
2422
```shell
2523
JLinkExe -V
2624
nrfutil -V
2725
```
2826

29-
### Install requirements
30-
```shell
31-
cd thingy91x-oob/tests/on_target
32-
pip install -r requirements.txt --break-system-packages
33-
```
27+
### NRF91 tests
28+
Precondition: thingy91x with segger fw on 53
3429

35-
### Get SEGGER ID
30+
Get device id
3631
```shell
3732
nrfutil device list
3833
```
3934

40-
### Run UART tests
41-
42-
Precondition: thingy91x with segger fw on 53
43-
35+
Set env
4436
```shell
4537
export SEGGER=<your_segger>
46-
pytest -s -v -m "dut1 and uart" tests
4738
```
4839

49-
### Run FOTA tests
50-
51-
Precondition: thingy91x with segger fw on 53
52-
40+
Additional fota and memfault envs
5341
```shell
54-
export SEGGER=<your_segger>
5542
export IMEI=<your_imei>
5643
export FINGERPRINT=<your_fingerprint>
57-
pytest -s -v -m "dut1 and fota" tests
5844
```
5945

60-
### Run DFU tests
46+
Run desired tests, example commands
47+
```shell
48+
pytest -s -v -m "not slow" tests
49+
pytest -s -v -m "not slow" tests/test_functional/test_uart_output.py
50+
pytest -s -v -m "not slow" tests/test_functional/test_location.py::test_wifi_location
51+
pytest -s -v -m "slow" tests/test_functional/test_fota.py::test_full_mfw_fota
52+
```
53+
54+
### NRF53 tests
6155

6256
Precondition: thingy91x with external debugger attached
6357

6458
IMPORTANT: switch must be on nrf53.
6559

66-
Set all this bunch of env variables appropriately (see worflow for details):
67-
SEGGER_NRF53, SEGGER_NRF91, UART_ID, NRF53_HEX_FILE, NRF53_APP_UPDATE_ZIP,
68-
NRF53_BL_UPDATE_ZIP, NRF91_HEX_FILE, NRF91_APP_UPDATE_ZIP, NRF91_BL_UPDATE_ZIP
60+
Set env
61+
```shell
62+
export SEGGER_NRF53=<your_segger_ext_deb>
63+
export SEGGER_NRF91=<your_segger_onboard_deb>
64+
export UART_ID_DUT_2=<your_dut_uart_id>
65+
```
6966

7067
```
71-
pytest -s -v -m dut2 tests
68+
pytest -s -v -m "slow" tests/test_bridge/test_serial_dfu.py::test_dfu
69+
pytest -s -v -m "slow" tests/test_bridge/test_conn_bridge.py::test_conn_bridge
70+
```
71+
72+
### PPK test
73+
74+
Precondition: thingy91x with segger fw on 53 and PPK setup
75+
76+
Set env
77+
```shell
78+
export SEGGER_PPK=<your_segger>
79+
pytest -s -v -m "slow" tests/test_ppk/test_power.py::test_power
7280
```
7381

7482
## Test docker image version control

0 commit comments

Comments
 (0)