From ed9a21acddb3223e0dbc35ecaf9c0ddd4d2265d4 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Thu, 5 Dec 2024 17:58:07 +0100 Subject: [PATCH] Check fabric-sync application with CCTRL tests on CI (#36422) * Check fabric-sync application with CCTRL tests on CI * Add support to local.py * Setup stdin pipe to keep app running --- .github/workflows/tests.yaml | 2 ++ scripts/tests/local.py | 3 +++ src/python_testing/TC_CCTRL_2_1.py | 15 +++++++++++++++ src/python_testing/TC_CCTRL_2_2.py | 16 ++++++++++++++++ src/python_testing/TC_CCTRL_2_3.py | 16 ++++++++++++++++ 5 files changed, 52 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index ceee20818defd8..7e19267b3742af 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -496,6 +496,7 @@ jobs: --target linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test \ --target linux-x64-fabric-admin-rpc-ipv6only-no-ble-no-wifi-clang \ --target linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang \ + --target linux-x64-fabric-sync-ipv6only-no-ble-no-wifi-clang \ --target linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang \ --target linux-x64-python-bindings \ build \ @@ -513,6 +514,7 @@ jobs: echo "NETWORK_MANAGEMENT_APP: out/linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test/matter-network-manager-app" >> /tmp/test_env.yaml echo "FABRIC_ADMIN_APP: out/linux-x64-fabric-admin-rpc-ipv6only-no-ble-no-wifi-clang/fabric-admin" >> /tmp/test_env.yaml echo "FABRIC_BRIDGE_APP: out/linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang/fabric-bridge-app" >> /tmp/test_env.yaml + echo "FABRIC_SYNC_APP: out/linux-x64-fabric-sync-ipv6only-no-ble-no-wifi-clang/fabric-sync" >> /tmp/test_env.yaml echo "LIGHTING_APP_NO_UNIQUE_ID: out/linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang/chip-lighting-app" >> /tmp/test_env.yaml echo "TRACE_APP: out/trace_data/app-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml echo "TRACE_TEST_JSON: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml diff --git a/scripts/tests/local.py b/scripts/tests/local.py index 05cf2f129a05fb..7321c1b1bead4c 100755 --- a/scripts/tests/local.py +++ b/scripts/tests/local.py @@ -170,6 +170,7 @@ def _do_build_apps(): f"{target_prefix}-energy-management-no-ble-clang-boringssl", f"{target_prefix}-fabric-admin-no-ble-no-wifi-rpc-ipv6only-clang-boringssl", f"{target_prefix}-fabric-bridge-no-ble-no-wifi-rpc-ipv6only-clang-boringssl", + f"{target_prefix}-fabric-sync-no-ble-no-wifi-ipv6only-clang-boringssl", f"{target_prefix}-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang", f"{target_prefix}-lit-icd-no-ble-clang-boringssl", f"{target_prefix}-lock-no-ble-clang-boringssl", @@ -383,6 +384,8 @@ def as_runner(path): as_runner(f'out/{target_prefix}-fabric-admin-no-ble-no-wifi-rpc-ipv6only-clang-boringssl/fabric-admin')} FABRIC_BRIDGE_APP: { as_runner(f'out/{target_prefix}-fabric-bridge-no-ble-no-wifi-rpc-ipv6only-clang-boringssl/fabric-bridge-app')} + FABRIC_SYNC_APP: { + as_runner(f'out/{target_prefix}-fabric-sync-no-ble-no-wifi-ipv6only-clang-boringssl/fabric-sync')} LIGHTING_APP_NO_UNIQUE_ID: {as_runner(f'out/{target_prefix}-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang/chip-lighting-app')} TRACE_APP: out/trace_data/app-{{SCRIPT_BASE_NAME}} TRACE_TEST_JSON: out/trace_data/test-{{SCRIPT_BASE_NAME}} diff --git a/src/python_testing/TC_CCTRL_2_1.py b/src/python_testing/TC_CCTRL_2_1.py index 24ebd19c5291fa..b9cb02e3f0b543 100644 --- a/src/python_testing/TC_CCTRL_2_1.py +++ b/src/python_testing/TC_CCTRL_2_1.py @@ -36,6 +36,21 @@ # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # factory-reset: true # quiet: true +# run2: +# app: ${FABRIC_SYNC_APP} +# app-args: --discriminator=1234 +# app-stdin-pipe: dut-fsa-stdin +# script-args: > +# --PICS src/app/tests/suites/certification/ci-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 0 +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === import chip.clusters as Clusters diff --git a/src/python_testing/TC_CCTRL_2_2.py b/src/python_testing/TC_CCTRL_2_2.py index 01a4fc42cc5708..0e651246230c7a 100644 --- a/src/python_testing/TC_CCTRL_2_2.py +++ b/src/python_testing/TC_CCTRL_2_2.py @@ -37,6 +37,22 @@ # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # factory-reset: true # quiet: true +# run2: +# app: ${FABRIC_SYNC_APP} +# app-args: --discriminator=1234 +# app-stdin-pipe: dut-fsa-stdin +# script-args: > +# --PICS src/app/tests/suites/certification/ci-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 0 +# --string-arg th_server_app_path:${ALL_CLUSTERS_APP} +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === # This test requires a TH_SERVER application. Please specify with --string-arg th_server_app_path: diff --git a/src/python_testing/TC_CCTRL_2_3.py b/src/python_testing/TC_CCTRL_2_3.py index 26a758bea01679..32eecc6369004b 100644 --- a/src/python_testing/TC_CCTRL_2_3.py +++ b/src/python_testing/TC_CCTRL_2_3.py @@ -37,6 +37,22 @@ # --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # factory-reset: true # quiet: true +# run2: +# app: ${FABRIC_SYNC_APP} +# app-args: --discriminator=1234 +# app-stdin-pipe: dut-fsa-stdin +# script-args: > +# --PICS src/app/tests/suites/certification/ci-pics-values +# --storage-path admin_storage.json +# --commissioning-method on-network +# --discriminator 1234 +# --passcode 20202021 +# --endpoint 0 +# --string-arg th_server_app_path:${ALL_CLUSTERS_APP} +# --trace-to json:${TRACE_TEST_JSON}.json +# --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# factory-reset: true +# quiet: true # === END CI TEST ARGUMENTS === # This test requires a TH_SERVER application. Please specify with --string-arg th_server_app_path: