zephyrproject-rtos / twister

[DEPRICATED] Project won't be continued.
https://github.com/zephyrproject-rtos/zephyr/issues/42458#issuecomment-1655795101
Apache License 2.0
10 stars 9 forks source link

bug: Xdist workers don't respect slow marking #107

Closed PerMac closed 1 year ago

PerMac commented 1 year ago

Tests marked as slow (e.g. tests/kernel/timer/starve) should be skipped by default and only executed when --enable-slow is passed. This works as should without enabling xdist workers. However, when -n (xdist) is used, the "slow" test are executed. To reproduce: pytest tests/kernel/timer/starve/ --zephyr-base=$ZEPHYR_BASE --platform=qemu_cortex_m3 -v -- correct: test is deselected

pytest tests/kernel/timer/starve/ --zephyr-base=$ZEPHYR_BASE --platform=qemu_cortex_m3 -v -n auto -- wrong: test is executed

PerMac commented 1 year ago

--enable-slow is added inside FilterPlugin (filter_plugin.py). Maybe this plugin is not propagated to workers?

fundakol commented 1 year ago

Filter plugin is not registered for xdist node. We need to register it also for xdist.

https://github.com/zephyrproject-rtos/twister/blob/f7baeb46ee8d807ead282baf0e7135eebb5288ea/src/twister2/plugin.py#L221-L225