From aaf89fad63170ede7c04eda6b46119680c853ec4 Mon Sep 17 00:00:00 2001 From: Morozov-5F Date: Wed, 6 Jul 2022 16:53:54 +0300 Subject: [PATCH] Fix tests for Door Lock cluster and run them against the lock app --- scripts/tests/chiptest/__init__.py | 28 +++++++++++-------- .../certification/Test_TC_DLRK_2_7.yaml | 4 +-- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index cb80b46021cbb9..806a6a462de8d7 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -21,32 +21,34 @@ def target_for_name(name: str): - if name.startswith('TV_') or name.startswith('Test_TC_MC_'): + if name.startswith("TV_") or name.startswith("Test_TC_MC_"): return TestTarget.TV - if name.startswith('DL_') or name.startswith('Test_TC_DL_'): + if name.startswith("DL_") or name.startswith("Test_TC_DLRK_"): return TestTarget.LOCK - if name.startswith('OTA_'): + if name.startswith("OTA_"): return TestTarget.OTA return TestTarget.ALL_CLUSTERS def tests_with_command(chip_tool: str, is_manual: bool): """Executes `chip_tool` binary to see what tests are available, using cmd - to get the list. + to get the list. """ - cmd = 'list' + cmd = "list" if is_manual: - cmd += '-manual' + cmd += "-manual" - result = subprocess.run([chip_tool, 'tests', cmd], capture_output=True) + result = subprocess.run([chip_tool, "tests", cmd], capture_output=True) - for name in result.stdout.decode('utf8').split('\n'): + for name in result.stdout.decode("utf8").split("\n"): if not name: continue target = target_for_name(name) - yield TestDefinition(run_name=name, name=name, target=target, is_manual=is_manual) + yield TestDefinition( + run_name=name, name=name, target=target, is_manual=is_manual + ) def AllTests(chip_tool: str): @@ -58,6 +60,10 @@ def AllTests(chip_tool: str): __all__ = [ - 'TestTarget', 'TestDefinition', 'AllTests', 'ApplicationPaths', - 'linux', 'runner', + "TestTarget", + "TestDefinition", + "AllTests", + "ApplicationPaths", + "linux", + "runner", ] diff --git a/src/app/tests/suites/certification/Test_TC_DLRK_2_7.yaml b/src/app/tests/suites/certification/Test_TC_DLRK_2_7.yaml index bfd7a8bd86a437..94995734530425 100644 --- a/src/app/tests/suites/certification/Test_TC_DLRK_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DLRK_2_7.yaml @@ -181,7 +181,7 @@ tests: hasValue: false - label: - "send Get Year Day Schedule Command to DUT and verify NOT_FOUND + "send Get Year Day Schedule Command to DUT and verify FAILURE response" command: "GetYearDaySchedule" arguments: @@ -197,7 +197,7 @@ tests: - name: "userIndex" value: 5 - name: "status" - value: 0x8B + value: 0x01 - name: "LocalStartTime" constraints: hasValue: false