From 036fc879515704a168dd61633e9f3550b3e469ea Mon Sep 17 00:00:00 2001 From: Vatsal Ghelani <152916324+vatsalghelani-csa@users.noreply.github.com> Date: Fri, 14 Jun 2024 21:49:52 -0400 Subject: [PATCH] Rename scripts/tests/yaml to scripts/tests/chipyaml (#33913) * rename scripts/tests/yaml to scripts/tests/chipyaml and replace the imports for yaml.paths_finder to chipyaml.paths_finder (and other occurences if they exist) * Adding more fixed references for renaming it to chipyaml --- docs/guides/simulated_device_linux.md | 2 +- docs/testing/yaml.md | 8 ++++---- examples/rvc-app/run_all_yaml_tests.sh | 6 +++--- scripts/tests/{yaml => chipyaml}/__init__.py | 0 scripts/tests/{yaml => chipyaml}/chiptool.py | 2 +- scripts/tests/{yaml => chipyaml}/darwinframeworktool.py | 2 +- scripts/tests/{yaml => chipyaml}/extensions/__init__.py | 0 .../{yaml => chipyaml}/extensions/example_cluster.py | 0 .../extensions/wildcard_response_extractor_cluster.py | 0 scripts/tests/{yaml => chipyaml}/paths_finder.py | 0 scripts/tests/{yaml => chipyaml}/relative_importer.py | 0 scripts/tests/{yaml => chipyaml}/runner.py | 0 scripts/tests/{yaml => chipyaml}/tests_finder.py | 0 scripts/tests/{yaml => chipyaml}/tests_logger.py | 0 scripts/tests/{yaml => chipyaml}/tests_tool.py | 0 scripts/tests/run_darwin_framework_ota_test.py | 2 +- scripts/tests/run_test_suite.py | 2 +- 17 files changed, 12 insertions(+), 12 deletions(-) rename scripts/tests/{yaml => chipyaml}/__init__.py (100%) rename scripts/tests/{yaml => chipyaml}/chiptool.py (98%) rename scripts/tests/{yaml => chipyaml}/darwinframeworktool.py (98%) rename scripts/tests/{yaml => chipyaml}/extensions/__init__.py (100%) rename scripts/tests/{yaml => chipyaml}/extensions/example_cluster.py (100%) rename scripts/tests/{yaml => chipyaml}/extensions/wildcard_response_extractor_cluster.py (100%) rename scripts/tests/{yaml => chipyaml}/paths_finder.py (100%) rename scripts/tests/{yaml => chipyaml}/relative_importer.py (100%) rename scripts/tests/{yaml => chipyaml}/runner.py (100%) rename scripts/tests/{yaml => chipyaml}/tests_finder.py (100%) rename scripts/tests/{yaml => chipyaml}/tests_logger.py (100%) rename scripts/tests/{yaml => chipyaml}/tests_tool.py (100%) diff --git a/docs/guides/simulated_device_linux.md b/docs/guides/simulated_device_linux.md index 81d36c90347115..db7e6bc4ef55ad 100644 --- a/docs/guides/simulated_device_linux.md +++ b/docs/guides/simulated_device_linux.md @@ -61,7 +61,7 @@ Now that the building is completed there is a `chip-app1` binary created. This binary can be executed on a linux os with test commands. ``` -./scripts/tests/yaml/runner.py [TEST NAME] app1 +./scripts/tests/chipyaml/runner.py [TEST NAME] app1 ``` ## Interacting with the simulated app diff --git a/docs/testing/yaml.md b/docs/testing/yaml.md index e7353d09697e30..0cf53814d5fe5c 100644 --- a/docs/testing/yaml.md +++ b/docs/testing/yaml.md @@ -347,12 +347,12 @@ Compile chip-tool: NOTE: use the target appropriate to your system -[chiptool.py](https://github.com/project-chip/connectedhomeip/blob/master/scripts/tests/yaml/chiptool.py) +[chiptool.py](https://github.com/project-chip/connectedhomeip/blob/master/scripts/tests/chipyaml/chiptool.py) can be used to run tests against a commissioned DUT (commissioned by chip-tool). This will start an interactive instance of chip-tool automatically. ``` -./scripts/tests/yaml/chiptool.py tests Test_TC_OO_2_1 --server_path ./out/linux-x64-chip-tool/chip-tool +./scripts/tests/chipyaml/chiptool.py tests Test_TC_OO_2_1 --server_path ./out/linux-x64-chip-tool/chip-tool ``` @@ -361,14 +361,14 @@ NOTE: substitute the appropriate test name and chip-tool path as appropriate. A list of available tests can be generated using: ``` -./scripts/tests/yaml/chiptool.py list +./scripts/tests/chipyaml/chiptool.py list ``` Config variables can be passed to chiptool.py after the script by separating with -- ``` -./scripts/tests/yaml/chiptool.py tests Test_TC_OO_2_1 --server_path ./out/linux-x64-chip-tool/chip-tool -- nodeId 0x12344321 +./scripts/tests/chipyaml/chiptool.py tests Test_TC_OO_2_1 --server_path ./out/linux-x64-chip-tool/chip-tool -- nodeId 0x12344321 ``` diff --git a/examples/rvc-app/run_all_yaml_tests.sh b/examples/rvc-app/run_all_yaml_tests.sh index 82f3461492f207..00026c8ea47ba1 100755 --- a/examples/rvc-app/run_all_yaml_tests.sh +++ b/examples/rvc-app/run_all_yaml_tests.sh @@ -16,11 +16,11 @@ if [ -z "$NODEID" ]; then fi # RVC Clean Mode cluster -./scripts/tests/yaml/chiptool.py tests Test_TC_RVCCLEANM_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && +./scripts/tests/chipyaml/chiptool.py tests Test_TC_RVCCLEANM_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && # RVC Operational State cluster - ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && + ./scripts/tests/chipyaml/chiptool.py tests Test_TC_RVCOPSTATE_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && # RVC Run Mode cluster - ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCRUNM_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && + ./scripts/tests/chipyaml/chiptool.py tests Test_TC_RVCRUNM_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && echo done diff --git a/scripts/tests/yaml/__init__.py b/scripts/tests/chipyaml/__init__.py similarity index 100% rename from scripts/tests/yaml/__init__.py rename to scripts/tests/chipyaml/__init__.py diff --git a/scripts/tests/yaml/chiptool.py b/scripts/tests/chipyaml/chiptool.py similarity index 98% rename from scripts/tests/yaml/chiptool.py rename to scripts/tests/chipyaml/chiptool.py index 99fc1d38a60a0a..46c758a15bf54f 100755 --- a/scripts/tests/yaml/chiptool.py +++ b/scripts/tests/chipyaml/chiptool.py @@ -26,7 +26,7 @@ from tests_finder import TestsFinder from tests_tool import send_raw_command, send_yaml_command -_DEFAULT_EXTENSIONS_DIR = 'scripts/tests/yaml/extensions' +_DEFAULT_EXTENSIONS_DIR = 'scripts/tests/chipyaml/extensions' _DEFAULT_PICS_FILE = 'src/app/tests/suites/certification/ci-pics-values' _DEFAULT_SPECIFICATIONS_DIR = 'src/app/zap-templates/zcl/data-model/chip/*.xml' diff --git a/scripts/tests/yaml/darwinframeworktool.py b/scripts/tests/chipyaml/darwinframeworktool.py similarity index 98% rename from scripts/tests/yaml/darwinframeworktool.py rename to scripts/tests/chipyaml/darwinframeworktool.py index 64648e57d371f4..bb676f9245c379 100755 --- a/scripts/tests/yaml/darwinframeworktool.py +++ b/scripts/tests/chipyaml/darwinframeworktool.py @@ -24,7 +24,7 @@ from runner import CONTEXT_SETTINGS, darwinframeworktool from tests_tool import send_raw_command, send_yaml_command -_DEFAULT_EXTENSIONS_DIR = 'scripts/tests/yaml/extensions' +_DEFAULT_EXTENSIONS_DIR = 'scripts/tests/chipyaml/extensions' _DEFAULT_PICS_FILE = 'src/app/tests/suites/certification/ci-pics-values' _DEFAULT_SPECIFICATIONS_DIR = 'src/app/zap-templates/zcl/data-model/chip/*.xml' diff --git a/scripts/tests/yaml/extensions/__init__.py b/scripts/tests/chipyaml/extensions/__init__.py similarity index 100% rename from scripts/tests/yaml/extensions/__init__.py rename to scripts/tests/chipyaml/extensions/__init__.py diff --git a/scripts/tests/yaml/extensions/example_cluster.py b/scripts/tests/chipyaml/extensions/example_cluster.py similarity index 100% rename from scripts/tests/yaml/extensions/example_cluster.py rename to scripts/tests/chipyaml/extensions/example_cluster.py diff --git a/scripts/tests/yaml/extensions/wildcard_response_extractor_cluster.py b/scripts/tests/chipyaml/extensions/wildcard_response_extractor_cluster.py similarity index 100% rename from scripts/tests/yaml/extensions/wildcard_response_extractor_cluster.py rename to scripts/tests/chipyaml/extensions/wildcard_response_extractor_cluster.py diff --git a/scripts/tests/yaml/paths_finder.py b/scripts/tests/chipyaml/paths_finder.py similarity index 100% rename from scripts/tests/yaml/paths_finder.py rename to scripts/tests/chipyaml/paths_finder.py diff --git a/scripts/tests/yaml/relative_importer.py b/scripts/tests/chipyaml/relative_importer.py similarity index 100% rename from scripts/tests/yaml/relative_importer.py rename to scripts/tests/chipyaml/relative_importer.py diff --git a/scripts/tests/yaml/runner.py b/scripts/tests/chipyaml/runner.py similarity index 100% rename from scripts/tests/yaml/runner.py rename to scripts/tests/chipyaml/runner.py diff --git a/scripts/tests/yaml/tests_finder.py b/scripts/tests/chipyaml/tests_finder.py similarity index 100% rename from scripts/tests/yaml/tests_finder.py rename to scripts/tests/chipyaml/tests_finder.py diff --git a/scripts/tests/yaml/tests_logger.py b/scripts/tests/chipyaml/tests_logger.py similarity index 100% rename from scripts/tests/yaml/tests_logger.py rename to scripts/tests/chipyaml/tests_logger.py diff --git a/scripts/tests/yaml/tests_tool.py b/scripts/tests/chipyaml/tests_tool.py similarity index 100% rename from scripts/tests/yaml/tests_tool.py rename to scripts/tests/chipyaml/tests_tool.py diff --git a/scripts/tests/run_darwin_framework_ota_test.py b/scripts/tests/run_darwin_framework_ota_test.py index 672b26369d3c3e..534a688cbed544 100755 --- a/scripts/tests/run_darwin_framework_ota_test.py +++ b/scripts/tests/run_darwin_framework_ota_test.py @@ -10,7 +10,7 @@ from chiptest.accessories import AppsRegister from chiptest.runner import Runner from chiptest.test_definition import App, ExecutionCapture -from yaml.paths_finder import PathsFinder +from chipyaml.paths_finder import PathsFinder TEST_NODE_ID = '0x12344321' TEST_VID = '0xFFF1' diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index 2df88cd6740653..c22b4abff92f09 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -28,7 +28,7 @@ from chiptest.accessories import AppsRegister from chiptest.glob_matcher import GlobMatcher from chiptest.test_definition import TestRunTime, TestTag -from yaml.paths_finder import PathsFinder +from chipyaml.paths_finder import PathsFinder DEFAULT_CHIP_ROOT = os.path.abspath( os.path.join(os.path.dirname(__file__), '..', '..'))