zephyr/tests/kernel/timer/timer_behavior/testcase.yaml
Ederson de Souza 22ba9456de tests/kernel/timer/timer_behavior: Add support for external tool
This patch adds a way to simplify using an external tool to measure
timer behaviour on Zephyr. It modifies the timer behaviour
jitter_drift.c tests to toggle a GPIO pin (defined via a new DTS
compatible, "test-kernel-timer-behavior-external") that can be connected
to an external tool, such as a logic analyzer, to measure timer
behaviour.

This GPIO pin toggle is behind a new CONFIG_TIMER_EXTERNAL_TEST Kconfig.

A new pytest test is added so that it can collect the statistics from
the external tool and assert some measurements. To collect statistics
from the external tool, one needs to provide a Python module which
provides a `run(seconds, config)` method, that will perform the test and
return the statistics. Check the README file for more information about
this interface.

Finally, this on twister, this new test is behind a new fixture,
"gpio-timerout".

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-09-27 20:25:09 -04:00

28 lines
675 B
YAML

tests:
kernel.timer.timer:
tags:
- kernel
- timer
min_ram: 16
platform_type:
- mcu
# Really want to exclude renode not the physical boards, but no good
# way of doing so at the moment.
platform_exclude:
- hifive1
- tflite-micro
- it8xxx2_evb
- m2gl025_miv
- mpfs_icicle
- hifive_unleashed
- mps2_an385
- mps2_an521_ns
kernel.timer.timer_behavior_external:
filter: dt_compat_enabled("test-kernel-timer-behavior-external")
harness: pytest
harness_config:
fixture: gpio_timerout
extra_configs:
- CONFIG_TIMER_EXTERNAL_TEST=y
- CONFIG_BOOT_DELAY=5000