blob: 1a2cfe50c90d6d0a09c03b81ef9d1ab1e70f59af [file] [log] [blame]
# 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/build.gni")
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")
declare_args() {
# Build monolithic test library.
chip_monolithic_tests = false
}
config("includes") {
include_dirs = [
"include",
".",
"${root_gen_dir}/include",
]
defines = [ "CHIP_HAVE_CONFIG_H=1" ]
}
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/credentials/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/core/tests",
"${chip_root}/src/lib/mdns/minimal/responders/tests",
"${chip_root}/src/lib/mdns/minimal/tests",
"${chip_root}/src/lib/mdns/tests",
"${chip_root}/src/lib/support/tests",
"${chip_root}/src/messaging/tests",
"${chip_root}/src/protocols/bdx/tests",
"${chip_root}/src/protocols/secure_channel/tests",
"${chip_root}/src/system/tests",
"${chip_root}/src/transport/retransmit/tests",
"${chip_root}/src/transport/tests",
]
if (current_os != "zephyr") {
deps += [
"${chip_root}/src/lib/mdns/minimal/records/tests",
"${chip_root}/src/setup_payload/tests",
"${chip_root}/src/transport/raw/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 (current_os != "zephyr" && chip_device_platform != "esp32") {
deps += [ "${chip_root}/src/lib/shell/tests" ]
}
if (chip_monolithic_tests) {
build_monolithic_library = true
output_name = "libCHIP_tests"
output_dir = "${root_out_dir}/lib"
}
}
if (chip_enable_happy_tests) {
group("happy_tests") {
deps = [
"${chip_root}/src/test_driver/happy/tests/standalone/inet:inet_tests",
]
}
}
}