Skip to content

Commit

Permalink
tests: on_target: Update README.md
Browse files Browse the repository at this point in the history
Adding instructions to run test locally.

Signed-off-by: Giacomo Dematteis <[email protected]>
  • Loading branch information
DematteisGiacomo committed Aug 16, 2024
1 parent 6f9e00f commit 27b5e19
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions tests/on_target/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
# OOB on target test

Test docker image: ghcr.io/dematteisgiacomo/ubuntu-jlink-nrfutil:latest
## Run test locally

Base ubuntu image with jlink and nrfutil device installed (see Dockerfile)

pytest is used

## Test description

To be added.

## Run test docker image locally
### Setup docker
```shell
docker pull ghcr.io/hello-nrfcloud/firmware:v2.0.0-preview31
cd <path_to_oob_dir>
cp <path_to_hex>/merged.hex thingy91x-oob/tests/on_target/artifacts/
docker run --rm -it \
--privileged \
-v /dev:/dev:rw \
-v /run/udev:/run/udev \
ghcr.io/hello-nrfcloud/firmware:latest
-v <abspath_to_oob_dir>:/work/thingy91x-oob \
ghcr.io/hello-nrfcloud/firmware:v2.0.0-preview31 \
/bin/bash
```

### Verify nrfutil/jlink works
```shell
nrfutil -V
nrfutil device list
```

### Run test
```shell
cd thingy91x-oob/tests/on_target
pip install -r requirements.txt --break-system-packages
export SEGGER=<your_segger>
pytest -s -v -m dut1 tests --firmware-hex artifacts/merged.hex
```

## Test docker image version control
Expand Down

0 comments on commit 27b5e19

Please sign in to comment.