zephyr/subsys
Ming Shao 94f2d2437f twister: refine the twister test plan generation
Due to the diverse coding styles and lack of preprocessing when
scanning for test cases, there were many unintended combinations
of yaml test scenarios and C test functions with the regex-based
test case discovery, which caused an inaccurate test plan and test
result stats.

As the new ztest fx is used, the test cases of a test instance can
be accurately determined via zephyr.symbols file.

Because the zephyr.symbols file is not available until after build,
test cases determination is placed right after the build stage of
the pipeline and before the runtime test collection.

For those test instances that don't go through the build stage,
such as those with "Skip filtered" (statically filtered) reason
before entering the pipeline, they are not affected.

This patch also adjust the stats logic because the zephyr.symbols
file is generated after build. So ExecutionCounter update is split
and some must be postponed until test execution pipeline is completed.

Some concepts:

A test instance = a yaml scenario + a platform
"Test instance" and "test config" are synonyms in twister, unfortunately
excessive IMHO...

A test instance can be filtered or skipped in 3 ways.
Let's define "runtime" as "after entering the execution pipeline".

1) statically filtered (before runtime)
   Such test instance is filtered by analyzing the yaml and never
   enters the execution pipeline.
2) cmake filtered (runtime)
   Such test instance enters pipeline and is filtered at cmake stage.
3) build skipped (also runtime)
   Such test instance enters pipeline and is skipped at build stage.

All the test instances that enter the execution pipeline will go
through the report stage, where ExecutionCounter is further updated.

The meaning of the fields of ExecutionCounter are:

 .skipped_configs = static filtered + cmake filtered + build skipped
 .skipped_runtime = cmake filtered + build skipped
 .skipped_filter = static filtered
 .done = instances that enter the execution pipeline
 .passed = instances that actually executed and passed

Definition of the overall stats:
total_complete = .done + .skipped_filter
total = yaml test scenario * applicable platforms
complete percentage = total_complete / total
pass rate = passed / (total - skipped_configs)

Signed-off-by: Ming Shao <ming.shao@intel.com>
2022-10-01 06:42:54 -04:00
..
bluetooth Bluetooth: controller: ensure memory access is aligned 2022-09-30 11:12:19 +02:00
canbus drivers: can: remove z prefix from public CAN API types 2022-08-18 10:19:29 +02:00
console includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
cpp
debug debug: coredump: flash backend: Switch FIXED_PARTITION_ macros 2022-09-06 09:56:37 +02:00
demand_paging
dfu dfu: include MCUboot's bootutil_public.h 2022-09-19 18:36:37 +02:00
disk
emul emul: emul_sbs_gauge: Fix compile 2022-08-17 12:47:16 -05:00
fb includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
fs fs: Switch from FLASH_AREA_ to FIXED_PARTITION_ macros 2022-09-06 09:56:37 +02:00
ipc ipc_service: icmsg: Trigger data read after magic 2022-09-15 16:31:48 +00:00
jwt
logging logging: move backends to subdirectory 2022-10-01 03:34:48 -07:00
lorawan includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
mgmt mgmt/mcumgr: Remove mcumgr_util.h header 2022-09-27 16:39:22 +02:00
modbus includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
net net: l2: wifi: Fix channel length check 2022-09-26 18:41:40 +02:00
pm pm: state: use DT_FOREACH_CHILD_SEP 2022-08-30 16:19:57 +02:00
portability sys_clock: define NSEC_PER_MSEC 2022-09-01 16:29:25 -04:00
random random: initialize devices at compile time 2022-08-19 11:51:26 +02:00
rtio
sd includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
settings settings: Switch from FIXED_AREA_ to FIXED_PARTITION_ macros 2022-09-06 09:56:37 +02:00
shell shell: Improve kernel stacks alignment 2022-09-20 09:05:00 +00:00
stats
storage includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
task_wdt task_wdt: Fix build warning on 64-bit platforms 2022-08-23 10:16:04 +02:00
testsuite twister: refine the twister test plan generation 2022-10-01 06:42:54 -04:00
timing
tracing pm: device_runtime.c: compile error 2022-09-10 17:04:20 -04:00
usb usb: dfu: Switch from FLASH_AREA_ to FIXED_PARTITION_ 2022-09-06 09:56:37 +02:00
CMakeLists.txt dfu: fixup conditional CMake include 2022-08-05 15:14:40 +02:00
Kconfig