| # Copyright (c) 2020 Project CHIP Authors |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| import("//build_overrides/chip.gni") |
| |
| import("${chip_root}/build/chip/tests.gni") |
| import("${chip_root}/src/lwip/lwip.gni") |
| import("${chip_root}/src/platform/device.gni") |
| |
| config("includes") { |
| include_dirs = [ |
| "include", |
| ".", |
| "${root_gen_dir}/include", |
| ] |
| |
| defines = [ "CHIP_SEPARATE_CONFIG_H=1" ] |
| |
| if (current_os == "linux") { |
| defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=1" ] |
| } |
| } |
| |
| if (chip_build_tests) { |
| import("${chip_root}/build/chip/chip_test_group.gni") |
| |
| chip_test_group("tests") { |
| deps = [ |
| "${chip_root}/src/crypto/tests", |
| "${chip_root}/src/inet/tests", |
| "${chip_root}/src/system/tests", |
| "${chip_root}/src/transport/raw/tests", |
| "${chip_root}/src/transport/retransmit/tests", |
| "${chip_root}/src/transport/tests", |
| ] |
| |
| if (chip_device_platform != "esp32") { |
| deps += [ |
| "${chip_root}/src/ble/tests", |
| "${chip_root}/src/lib/core/tests", |
| "${chip_root}/src/lib/support/tests", |
| "${chip_root}/src/platform/tests", |
| "${chip_root}/src/setup_payload/tests", |
| ] |
| } |
| |
| if (chip_with_lwip && chip_device_platform != "esp32") { |
| deps += [ "${chip_root}/src/lwip/tests" ] |
| } |
| |
| if (current_os != "zephyr" && chip_device_platform != "esp32") { |
| deps += [ "${chip_root}/src/lib/shell/tests" ] |
| } |
| } |
| } |