1 # Copyright (c) 2020 Project CHIP Authors
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 import("//build_overrides/build.gni")
16 import("//build_overrides/chip.gni")
18 import("${chip_root}/build/chip/tests.gni")
19 import("${chip_root}/src/ble/ble.gni")
20 import("${chip_root}/src/lwip/lwip.gni")
21 import("${chip_root}/src/platform/device.gni")
24 # Build monolithic test library.
25 chip_monolithic_tests = false
32 "${root_gen_dir}/include",
35 defines = [ "CHIP_HAVE_CONFIG_H=1" ]
38 if (chip_build_tests) {
39 import("${chip_root}/build/chip/chip_test_group.gni")
41 chip_test_group("tests") {
43 "${chip_root}/src/app/tests",
44 "${chip_root}/src/credentials/tests",
45 "${chip_root}/src/crypto/tests",
46 "${chip_root}/src/inet/tests",
47 "${chip_root}/src/lib/asn1/tests",
48 "${chip_root}/src/lib/core/tests",
49 "${chip_root}/src/lib/mdns/minimal/core/tests",
50 "${chip_root}/src/lib/mdns/minimal/responders/tests",
51 "${chip_root}/src/lib/mdns/minimal/tests",
52 "${chip_root}/src/lib/support/tests",
53 "${chip_root}/src/messaging/tests",
54 "${chip_root}/src/protocols/bdx/tests",
55 "${chip_root}/src/protocols/secure_channel/tests",
56 "${chip_root}/src/system/tests",
57 "${chip_root}/src/transport/retransmit/tests",
58 "${chip_root}/src/transport/tests",
61 if (current_os != "zephyr") {
63 "${chip_root}/src/lib/mdns/minimal/records/tests",
64 "${chip_root}/src/setup_payload/tests",
65 "${chip_root}/src/transport/raw/tests",
69 if (chip_device_platform != "none") {
70 deps += [ "${chip_root}/src/lib/mdns/minimal/tests" ]
73 if (chip_device_platform != "esp32") {
74 deps += [ "${chip_root}/src/platform/tests" ]
77 if (chip_config_network_layer_ble) {
78 deps += [ "${chip_root}/src/ble/tests" ]
81 if (chip_with_lwip && chip_device_platform != "esp32") {
82 deps += [ "${chip_root}/src/lwip/tests" ]
85 if (current_os != "zephyr" && chip_device_platform != "esp32") {
86 deps += [ "${chip_root}/src/lib/shell/tests" ]
89 if (chip_monolithic_tests) {
90 build_monolithic_library = true
91 output_name = "libCHIP_tests"
92 output_dir = "${root_out_dir}/lib"
96 if (chip_enable_happy_tests) {
97 group("happy_tests") {
99 "${chip_root}/src/test_driver/happy/tests/standalone/inet:inet_tests",