twister: config: test on integration plaforms if defined
Add option to force integration mode on a defined list of tests, for example tests for sample that are identified with 'sample.'. A sample per definition shall be tested on documented and supported platforms listed in the sample documentation. Samples shall not be used as tests to verify functionality of a feature on all available plaforms in Zephyr. To still allow testing on platforms not listed in the doc, and when such platforms are covered by the provided filter, we should still be able to build/run the tests on those platforms (not directly listed in integration_platforms). We detect a sample by its test identifier, i.e., it starts with 'sample.'. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
2bac5eec84
commit
b0792bbfa2
@ -786,11 +786,14 @@ class TestPlan:
|
||||
if self.options.integration:
|
||||
platform_scope = integration_platforms
|
||||
else:
|
||||
# if not in integration mode, still add integration platforms to the list
|
||||
platform_scope = platforms
|
||||
if not platform_filter:
|
||||
platform_scope = platforms + integration_platforms
|
||||
else:
|
||||
platform_scope = platforms
|
||||
tco = self.test_config.get('options', {})
|
||||
im = tco.get('integration_mode', [])
|
||||
if any(ts.id.startswith(i) for i in im):
|
||||
platform_scope = integration_platforms
|
||||
else:
|
||||
platform_scope += integration_platforms
|
||||
else:
|
||||
platform_scope = platforms
|
||||
|
||||
|
||||
@ -4,6 +4,15 @@
|
||||
|
||||
type: map
|
||||
mapping:
|
||||
"options":
|
||||
type: map
|
||||
required: false
|
||||
mapping:
|
||||
"integration_mode":
|
||||
type: seq
|
||||
required: false
|
||||
sequence:
|
||||
- type: str
|
||||
"platforms":
|
||||
type: map
|
||||
required: false
|
||||
|
||||
25
tests/test_config_ci.yaml
Normal file
25
tests/test_config_ci.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
options:
|
||||
integration_mode:
|
||||
- sample.
|
||||
platforms:
|
||||
override_default_platforms: false
|
||||
increased_platform_scope: true
|
||||
levels:
|
||||
- name: smoke
|
||||
description: >
|
||||
A plan to be used verifying basic zephyr features on hardware.
|
||||
adds:
|
||||
- kernel.threads.*
|
||||
- kernel.timer.behavior
|
||||
- arch.interrupt
|
||||
- boards.*
|
||||
- drivers.gpio.1pin
|
||||
- drivers.console.uart
|
||||
- drivers.entropy
|
||||
- name: acceptance
|
||||
description: >
|
||||
More coverage
|
||||
inherits:
|
||||
- smoke
|
||||
adds:
|
||||
- kernel.*
|
||||
Loading…
Reference in New Issue
Block a user