twister: pytest: Parametrize scope of the dut fixture

Added pytest_dut_scope keyword under harness_config section.
New keyword is used to determine the scope of dut and shell
fixtures in pytest-twister-harness plugin.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
This commit is contained in:
Grzegorz Chwierut 2023-10-25 12:33:23 +02:00 committed by Maureen Helm
commit fffe0b9fad
7 changed files with 57 additions and 7 deletions

View file

@ -104,6 +104,10 @@ mapping:
required: false
sequence:
- type: str
"pytest_dut_scope":
type: str
enum: ["function", "class", "module", "package", "session"]
required: false
"regex":
type: seq
required: false
@ -304,6 +308,10 @@ mapping:
required: false
sequence:
- type: str
"pytest_dut_scope":
type: str
enum: ["function", "class", "module", "package", "session"]
required: false
"regex":
type: seq
required: false