diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 5c5e0ac65039e7..69ba5d9b348846 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -138,16 +138,16 @@ jobs: out/ota_requestor_debug/chip-ota-requestor-app \ /tmp/bloat_reports/ - - name: Build example Standalone Door Lock App + - name: Build example Standalone Lock App timeout-minutes: 10 run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target linux-x64-door-lock \ + --target linux-x64-lock \ build" .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - linux debug door-lock-app \ - out/linux-x64-door-lock/chip-door-lock-app \ + linux debug lock-app \ + out/linux-x64-lock/chip-lock-app \ /tmp/bloat_reports/ - name: Uploading Size Reports uses: actions/upload-artifact@v2 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8f31319e5f76a7..6a298c0905b2d8 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -82,7 +82,7 @@ jobs: "./scripts/build/build_examples.py \ --target linux-x64-chip-tool${CHIP_TOOL_VARIANT}-${BUILD_VARIANT} \ --target linux-x64-all-clusters-test-group-${BUILD_VARIANT} \ - --target linux-x64-door-lock-${BUILD_VARIANT} \ + --target linux-x64-lock-${BUILD_VARIANT} \ --target linux-x64-tv-app-${BUILD_VARIANT} \ build \ --copy-artifacts-to objdir-clone \ @@ -96,7 +96,7 @@ jobs: run \ --iterations 1 \ --all-clusters-app ./out/linux-x64-all-clusters-test-group-${BUILD_VARIANT}/chip-all-clusters-app \ - --door-lock-app ./out/linux-x64-door-lock-${BUILD_VARIANT}/chip-door-lock-app \ + --lock-app ./out/linux-x64-lock-${BUILD_VARIANT}/chip-lock-app \ --tv-app ./out/linux-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ " - name: Uploading core files @@ -193,7 +193,7 @@ jobs: run \ --iterations 1 \ --all-clusters-app ./out/darwin-x64-all-clusters-${BUILD_VARIANT}/chip-all-clusters-app \ - --door-lock-app ./out/darwin-x64-door-lock-${BUILD_VARIANT}/chip-door-lock-app \ + --lock-app ./out/darwin-x64-lock-${BUILD_VARIANT}/chip-lock-app \ --tv-app ./out/darwin-x64-tv-app-${BUILD_VARIANT}/chip-tv-app \ " - name: Uploading core files diff --git a/BUILD.gn b/BUILD.gn index d8661c6701b335..b9f5ce3c48fc7d 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -246,8 +246,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { enable_linux_thermostat_app_build = enable_default_builds && (host_os == "linux" || host_os == "mac") - # Build the Linux door lock app example. - enable_linux_door_lock_app_build = + # Build the Linux lock app example. + enable_linux_lock_app_build = enable_default_builds && (host_os == "linux" || host_os == "mac") # Build the cc13x2x7_26x2x7 lock app example. @@ -413,10 +413,10 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { } } - if (enable_linux_door_lock_app_build) { - group("linux_door_lock_app") { + if (enable_linux_lock_app_build) { + group("linux_lock_app") { deps = [ - "${chip_root}/examples/door-lock-app/linux(${standalone_toolchain})", + "${chip_root}/examples/lock-app/linux(${standalone_toolchain})", ] } } @@ -518,8 +518,8 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { if (enable_linux_lighting_app_build) { deps += [ ":linux_lighting_app" ] } - if (enable_linux_door_lock_app_build) { - deps += [ ":linux_door_lock_app" ] + if (enable_linux_lock_app_build) { + deps += [ ":linux_lock_app" ] } if (enable_efr32_lock_app_build) { deps += [ ":efr32_lock_app" ] diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index 5373c4a657dd87..5ee9a255e1bc8a 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -23,9 +23,9 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", - "${chip_root}/examples/door-lock-app/linux/src/LockEndpoint.cpp", - "${chip_root}/examples/door-lock-app/linux/src/LockManager.cpp", - "${chip_root}/examples/door-lock-app/linux/src/ZCLDoorLockCallbacks.cpp", + "${chip_root}/examples/lock-app/linux/src/LockEndpoint.cpp", + "${chip_root}/examples/lock-app/linux/src/LockManager.cpp", + "${chip_root}/examples/lock-app/linux/src/ZCLDoorLockCallbacks.cpp", "AppOptions.cpp", "include/tv-callbacks.cpp", "include/tv-callbacks.h", @@ -41,7 +41,7 @@ source_set("chip-all-clusters-common") { include_dirs = [ "${chip_root}/examples/all-clusters-app/all-clusters-common/include", - "${chip_root}/examples/door-lock-app/linux/include", + "${chip_root}/examples/lock-app/linux/include", ] cflags = [ "-Wconversion" ] diff --git a/examples/lock-app/linux/BUILD.gn b/examples/lock-app/linux/BUILD.gn index 90dd96b3d23bb1..22706fcfb83686 100644 --- a/examples/lock-app/linux/BUILD.gn +++ b/examples/lock-app/linux/BUILD.gn @@ -15,7 +15,7 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") -executable("chip-door-lock-app") { +executable("chip-lock-app") { sources = [ "main.cpp", "src/LockEndpoint.cpp", @@ -24,13 +24,13 @@ executable("chip-door-lock-app") { ] deps = [ - "${chip_root}/examples/door-lock-app/door-lock-common", + "${chip_root}/examples/lock-app/lock-common", "${chip_root}/examples/platform/linux:app-main", "${chip_root}/src/lib", ] include_dirs = [ - "${chip_root}/examples/door-lock-app/door-lock-common/include", + "${chip_root}/examples/lock-app/lock-common/include", "include", ] @@ -40,5 +40,5 @@ executable("chip-door-lock-app") { } group("linux") { - deps = [ ":chip-door-lock-app" ] + deps = [ ":chip-lock-app" ] } diff --git a/examples/lock-app/linux/Dockerfile b/examples/lock-app/linux/Dockerfile index 0a6e4989277b98..91ea1daa1faba1 100644 --- a/examples/lock-app/linux/Dockerfile +++ b/examples/lock-app/linux/Dockerfile @@ -17,7 +17,7 @@ from generic_node_image RUN apt-get install -y libglib2.0 -COPY out/debug/chip-door-lock-app /usr/bin/ +COPY out/debug/chip-lock-app /usr/bin/ COPY entrypoint.sh / ENTRYPOINT ["/entrypoint.sh", "server"] diff --git a/examples/lock-app/linux/README.md b/examples/lock-app/linux/README.md index 17469aecde36c9..124bf5999d8d27 100644 --- a/examples/lock-app/linux/README.md +++ b/examples/lock-app/linux/README.md @@ -1,4 +1,4 @@ -# Door Lock Application for Linux +# Lock Application for Linux This application is quite different from regular lock-app. The app showcases the current implementation of the Door Lock cluster and doesn't rely on the On/Off @@ -13,5 +13,5 @@ be controlled from tests (like RPC in lighting-app). The application could be build in the same manner as `all-clusters-app`: ``` -? scripts/examples/gn_build_example.sh examples/door-lock-app/linux out/door-lock-app chip_config_network_layer_ble=false +? scripts/examples/gn_build_example.sh examples/lock-app/linux out/lock-app chip_config_network_layer_ble=false ``` diff --git a/examples/lock-app/linux/entrypoint.sh b/examples/lock-app/linux/entrypoint.sh index 45d3ac88be87ed..72524ee3afd5a4 100755 --- a/examples/lock-app/linux/entrypoint.sh +++ b/examples/lock-app/linux/entrypoint.sh @@ -26,4 +26,4 @@ ot-ctl panid 0x1234 ot-ctl ifconfig up ot-ctl thread start -chip-door-lock-app +chip-lock-app diff --git a/examples/lock-app/linux/src/LockEndpoint.cpp b/examples/lock-app/linux/src/LockEndpoint.cpp index 33a3ce36d789dd..7b345c6b468daf 100644 --- a/examples/lock-app/linux/src/LockEndpoint.cpp +++ b/examples/lock-app/linux/src/LockEndpoint.cpp @@ -32,7 +32,7 @@ bool LockEndpoint::Unlock(const Optional & pin, DlOperationError bool LockEndpoint::GetUser(uint16_t userIndex, EmberAfPluginDoorLockUserInfo & user) const { - ChipLogProgress(Zcl, "Door Lock App: LockEndpoint::GetUser [endpoint=%d,userIndex=%hu]", mEndpointId, userIndex); + ChipLogProgress(Zcl, "Lock App: LockEndpoint::GetUser [endpoint=%d,userIndex=%hu]", mEndpointId, userIndex); uint16_t adjustedUserIndex = static_cast(userIndex - 1); if (adjustedUserIndex > mLockUsers.size()) @@ -74,7 +74,7 @@ bool LockEndpoint::SetUser(uint16_t userIndex, chip::FabricIndex creator, chip:: DlCredentialRule credentialRule, const DlCredential * credentials, size_t totalCredentials) { ChipLogProgress(Zcl, - "Door Lock App: LockEndpoint::SetUser " + "Lock App: LockEndpoint::SetUser " "[endpoint=%d,userIndex=%" PRIu16 ",creator=%d,modifier=%d,userName=\"%.*s\",uniqueId=%" PRIx32 ",userStatus=%u,userType=%u," "credentialRule=%u,credentials=%p,totalCredentials=%zu]", @@ -132,7 +132,7 @@ bool LockEndpoint::SetUser(uint16_t userIndex, chip::FabricIndex creator, chip:: bool LockEndpoint::GetCredential(uint16_t credentialIndex, DlCredentialType credentialType, EmberAfPluginDoorLockCredentialInfo & credential) const { - ChipLogProgress(Zcl, "Door Lock App: LockEndpoint::GetCredential [endpoint=%d,credentialIndex=%" PRIu16 ",credentialType=%u]", + ChipLogProgress(Zcl, "Lock App: LockEndpoint::GetCredential [endpoint=%d,credentialIndex=%" PRIu16 ",credentialType=%u]", mEndpointId, credentialIndex, to_underlying(credentialType)); if (credentialIndex >= mLockCredentials.size() || (0 == credentialIndex && DlCredentialType::kProgrammingPIN != credentialType)) @@ -162,7 +162,7 @@ bool LockEndpoint::SetCredential(uint16_t credentialIndex, DlCredentialStatus cr const chip::ByteSpan & credentialData) { ChipLogProgress(Zcl, - "Door Lock App: LockEndpoint::SetCredential " + "Lock App: LockEndpoint::SetCredential " "[endpoint=%d,credentialIndex=%" PRIu16 ",credentialStatus=%u,credentialType=%u,credentialDataSize=%zu]", mEndpointId, credentialIndex, to_underlying(credentialStatus), to_underlying(credentialType), credentialData.size()); @@ -289,14 +289,14 @@ bool LockEndpoint::setLockState(DlLockState lockState, const Optional ApplicationPaths: return ApplicationPaths( chip_tool='ip netns exec tool'.split() + paths.chip_tool, all_clusters_app='ip netns exec app'.split() + paths.all_clusters_app, - door_lock_app='ip netns exec app'.split() + paths.door_lock_app, + lock_app='ip netns exec app'.split() + paths.lock_app, tv_app='ip netns exec app'.split() + paths.tv_app, ) diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 31b39e99291725..ca2c4e58bab172 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -145,14 +145,14 @@ def __updateSetUpCode(self): class TestTarget(Enum): ALL_CLUSTERS = auto() TV = auto() - DOOR_LOCK = auto() + LOCK = auto() @dataclass class ApplicationPaths: chip_tool: typing.List[str] all_clusters_app: typing.List[str] - door_lock_app: typing.List[str] + lock_app: typing.List[str] tv_app: typing.List[str] @@ -212,8 +212,8 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str): app_cmd = paths.all_clusters_app elif self.target == TestTarget.TV: app_cmd = paths.tv_app - elif self.target == TestTarget.DOOR_LOCK: - app_cmd = paths.door_lock_app + elif self.target == TestTarget.LOCK: + app_cmd = paths.lock_app else: raise Exception("Unknown test target - " "don't know which application to run") diff --git a/scripts/tests/run_test_suite.py b/scripts/tests/run_test_suite.py index 25276b67772011..bf909c2f248149 100755 --- a/scripts/tests/run_test_suite.py +++ b/scripts/tests/run_test_suite.py @@ -168,9 +168,9 @@ def cmd_list(context): default=FindBinaryPath('chip-all-clusters-app'), help='what all clusters app to use') @click.option( - '--door-lock-app', - default=FindBinaryPath('chip-door-lock-app'), - help='what door lock app to use') + '--lock-app', + default=FindBinaryPath('chip-lock-app'), + help='what lock app to use') @click.option( '--tv-app', default=FindBinaryPath('chip-tv-app'), @@ -181,14 +181,14 @@ def cmd_list(context): default=FindBinaryPath("ci-pics-values"), help='PICS file to use for test runs.') @click.pass_context -def cmd_run(context, iterations, all_clusters_app, door_lock_app, tv_app, pics_file): +def cmd_run(context, iterations, all_clusters_app, lock_app, tv_app, pics_file): runner = chiptest.runner.Runner() # Command execution requires an array paths = chiptest.ApplicationPaths( chip_tool=[context.obj.chip_tool], all_clusters_app=[all_clusters_app], - door_lock_app=[door_lock_app], + lock_app=[lock_app], tv_app=[tv_app] )