| # 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/ble/ble.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_HAVE_CONFIG_H=1" ] |
| |
| if (chip_device_platform == "linux" || chip_device_platform == "darwin") { |
| defines += [ "CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE=${chip_enable_ble}" ] |
| } |
| } |
| |
| if (chip_build_tests) { |
| import("${chip_root}/build/chip/chip_test_group.gni") |
| |
| chip_test_group("tests") { |
| deps = [ |
| "${chip_root}/src/app/tests", |
| "${chip_root}/src/crypto/tests", |
| "${chip_root}/src/inet/tests", |
| "${chip_root}/src/lib/asn1/tests", |
| "${chip_root}/src/lib/core/tests", |
| "${chip_root}/src/lib/mdns/minimal/tests", |
| "${chip_root}/src/lib/support/tests", |
| "${chip_root}/src/messaging/tests", |
| "${chip_root}/src/protocols/bdx/tests", |
| "${chip_root}/src/setup_payload/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 != "none") { |
| deps += [ "${chip_root}/src/lib/mdns/minimal/tests" ] |
| } |
| |
| if (chip_device_platform != "esp32") { |
| deps += [ "${chip_root}/src/platform/tests" ] |
| } |
| |
| if (chip_config_network_layer_ble) { |
| deps += [ "${chip_root}/src/ble/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" ] |
| } |
| } |
| |
| if (chip_enable_happy_tests) { |
| group("happy_tests") { |
| deps = [ |
| "${chip_root}/src/test_driver/happy/tests/standalone/inet:inet_tests", |
| ] |
| } |
| } |
| } |