From cf89e2883d20bc86823f2bb7eced5a8563abfade Mon Sep 17 00:00:00 2001 From: Praful Swarnakar Date: Thu, 13 Sep 2018 02:58:28 +0530 Subject: [PATCH] sanitycheck: Add fixture option for external hardware dependecy Add a new option as fixture in harness configurations for utilizing sanitycheck to identify test cases that require external hardware such as sensor, ble, networking for validation. The config will be added to yaml files with unique fixture name to identify each hardware and allow automation to trigger test execution on setup having the specific fixture enabled. Also, remove the default required for type and regex configs that is not essential in case of ztest based test cases. Signed-off-by: Praful Swarnakar --- scripts/sanity_chk/sanitycheck-tc-schema.yaml | 14 ++++++++++---- scripts/sanitycheck | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/sanity_chk/sanitycheck-tc-schema.yaml b/scripts/sanity_chk/sanitycheck-tc-schema.yaml index d1d85dd0825..47545228462 100644 --- a/scripts/sanity_chk/sanitycheck-tc-schema.yaml +++ b/scripts/sanity_chk/sanitycheck-tc-schema.yaml @@ -47,7 +47,10 @@ mapping: mapping: "type": type: str - required: yes + required: no + "fixture": + type: str + required: no "ordered": type: bool required: no @@ -56,7 +59,7 @@ mapping: required: no "regex": type: seq - required: yes + required: no sequence: - type: str "min_ram": @@ -160,7 +163,10 @@ mapping: mapping: "type": type: str - required: yes + required: no + "fixture": + type: str + required: no "ordered": type: bool required: no @@ -169,7 +175,7 @@ mapping: required: no "regex": type: seq - required: yes + required: no sequence: - type: str "min_ram": diff --git a/scripts/sanitycheck b/scripts/sanitycheck index 603e25a6515..e5f522b1636 100755 --- a/scripts/sanitycheck +++ b/scripts/sanitycheck @@ -1172,7 +1172,7 @@ testcase_valid_keys = {"tags": {"type": "set", "required": False}, "toolchain_whitelist": {"type": "set"}, "filter": {"type": "str"}, "harness": {"type": "str"}, - "harness_config": {"type": "map"} + "harness_config": {"type": "map", "default": {}} }