diff --git a/examples/lighting-app/linux/BUILD.gn b/examples/lighting-app/linux/BUILD.gn index 80477ba7332b3e..b126156cafe604 100644 --- a/examples/lighting-app/linux/BUILD.gn +++ b/examples/lighting-app/linux/BUILD.gn @@ -15,6 +15,7 @@ import("//build_overrides/chip.gni") import("${chip_root}/build/chip/tools.gni") +import("${chip_root}/src/platform/device.gni") assert(chip_build_tools) @@ -35,6 +36,11 @@ executable("chip-tool-server") { "main.cpp", ] + defines = [ + "CHIP_DEVICE_CONFIG_ENABLE_WPA=${chip_device_config_enable_wpa}", + "CHIP_ENABLE_OPENTHREAD=${chip_enable_openthread}", + ] + if (is_debug) { defines = [ "BUILD_RELEASE=0" ] } else { diff --git a/examples/lighting-app/linux/entrypoint.sh b/examples/lighting-app/linux/entrypoint.sh index 04dfa2cdeed6db..efa22d51c36cf1 100755 --- a/examples/lighting-app/linux/entrypoint.sh +++ b/examples/lighting-app/linux/entrypoint.sh @@ -9,4 +9,4 @@ ot-ctl panid 0x1234 ot-ctl ifconfig up ot-ctl thread start -chip-tool-server +chip-tool-server --thread diff --git a/examples/lighting-app/linux/main.cpp b/examples/lighting-app/linux/main.cpp index 1634f60e64aea1..02be30a2b35500 100644 --- a/examples/lighting-app/linux/main.cpp +++ b/examples/lighting-app/linux/main.cpp @@ -180,14 +180,16 @@ int main(int argc, char * argv[]) #if CHIP_DEVICE_CONFIG_ENABLE_WPA if (LinuxDeviceOptions::GetInstance().mWiFi) { - chip::DeviceLayer::ConnectivityMgrImpl().StartWiFiManagement(); + SuccessOrExit(err = chip::DeviceLayer::ConnectivityMgrImpl().StartWiFiManagement()); + std::cerr << "WiFi Management initialized." << std::endl; } #endif // CHIP_DEVICE_CONFIG_ENABLE_WPA #if CHIP_ENABLE_OPENTHREAD if (LinuxDeviceOptions::GetInstance().mThread) { - chip::DeviceLayer::ThreadStackMgrImpl().InitThreadStack(); + SuccessOrExit(err = chip::DeviceLayer::ThreadStackMgrImpl().InitThreadStack()); + std::cerr << "Thread initialized." << std::endl; } #endif // CHIP_ENABLE_OPENTHREAD diff --git a/src/test_driver/linux-cirque/test-on-off-cluster.py b/src/test_driver/linux-cirque/test-on-off-cluster.py index 94d3f5e32aae5c..d4fb7606c48b5f 100644 --- a/src/test_driver/linux-cirque/test-on-off-cluster.py +++ b/src/test_driver/linux-cirque/test-on-off-cluster.py @@ -106,7 +106,7 @@ def run_data_model_test(self): for device_id in server_ids: self.logger.info("checking device log for {}".format( self.get_device_pretty_id(device_id))) - self.assertTrue(self.sequenceMatch(self.get_device_log(device_id).decode('utf-8'), ["LightingManager::InitiateAction(ON_ACTION)", "LightingManager::InitiateAction(OFF_ACTION)"]), + self.assertTrue(self.sequenceMatch(self.get_device_log(device_id).decode('utf-8'), ["Thread initialized.", "LightingManager::InitiateAction(ON_ACTION)", "LightingManager::InitiateAction(OFF_ACTION)"]), "Datamodel test failed: cannot find matching string from device {}".format(device_id))