pytest sample & docs: Replace native_posix with native_sim

In the docs replace references to native_posix with native_sim
Switch the default test platform to native_sim from native_posix

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2023-11-16 09:50:30 +01:00 committed by Carles Cufí
commit 0ce4de8eec
3 changed files with 9 additions and 7 deletions

View file

@ -1,6 +1,8 @@
tests:
sample.twister.pytest:
platform_allow: native_posix
platform_allow:
- native_posix
- native_sim
harness: pytest
harness_config:
pytest_args: ["--custom-pytest-arg", "foo", "--cmdopt", "."]
@ -8,4 +10,4 @@ tests:
- test_framework
- pytest
integration_platforms:
- native_posix
- native_sim

View file

@ -6,7 +6,7 @@ tests:
extra_configs:
- arch:posix:CONFIG_NATIVE_UART_0_ON_STDINOUT=y
integration_platforms:
- native_posix
- native_sim
- qemu_cortex_m3
tags:
- test_framework

View file

@ -20,8 +20,8 @@ Run exemplary test shell application by Twister:
cd ${ZEPHYR_BASE}
# native_posix & QEMU
./scripts/twister -p native_posix -p qemu_x86 -T samples/subsys/testsuite/pytest/shell
# native_sim & QEMU
./scripts/twister -p native_sim -p qemu_x86 -T samples/subsys/testsuite/pytest/shell
# hardware
./scripts/twister -p nrf52840dk_nrf52840 --device-testing --device-serial /dev/ttyACM0 -T samples/subsys/testsuite/pytest/shell
@ -34,8 +34,8 @@ or build shell application by west and call pytest directly:
cd ${ZEPHYR_BASE}/samples/subsys/testsuite/pytest/shell
# native_posix
west build -p -b native_posix -- -DCONFIG_NATIVE_UART_0_ON_STDINOUT=y
# native_sim
west build -p -b native_sim -- -DCONFIG_NATIVE_UART_0_ON_STDINOUT=y
pytest --twister-harness --device-type=native --build-dir=build -p twister_harness.plugin
# QEMU