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")
17 import("//build_overrides/nlunit_test.gni")
19 import("${chip_root}/src/platform/device.gni")
21 if (chip_device_platform != "none") {
22 import("${chip_root}/build/chip/chip_test_suite.gni")
24 chip_test_suite("tests") {
25 output_name = "libPlatformTests"
29 if (current_os != "zephyr") {
30 # TODO: unclear as to why this fails on zephyr
31 # pre-conversion this test was not registered as CHIP_REGISTER_TEST_SUITE
32 test_sources += [ "TestPlatformMgr.cpp" ]
35 if (chip_mdns != "none" && chip_enable_happy_tests &&
36 (chip_device_platform == "linux" || chip_device_platform == "darwin")) {
37 test_sources += [ "TestMdns.cpp" ]
41 "${chip_root}/src/lib/support",
42 "${chip_root}/src/platform",
43 "${chip_root}/src/system",
44 "${nlunit_test_root}:nlunit-test",
47 # These tests appear to be broken on Mac.
48 if (current_os != "mac") {
50 "TestConfigurationMgr.cpp",
51 "TestPlatformTime.cpp",
55 if (chip_enable_openthread) {
56 # FIXME: TestThreadStackMgr requires ot-br-posix daemon to be running
57 # test_sources += [ "TestThreadStackMgr.cpp" ]
60 if (chip_enable_ble) {
61 # FIXME: TestCHIPoBLEStackMgr requires bluetoothd daemon to be running
63 # TODO: Driver code has a check for only running the test
64 # if the first argument to the test is a '1'.
65 # This is very odd and test should probably be moved as an integration
66 # test rather than a unit test
69 "TestCHIPoBLEStackMgr.cpp",
70 "TestCHIPoBLEStackMgr.h",
71 "TestCHIPoBLEStackMgrDriver.cpp",
73 tests = [ "TestCHIPoBLEStackMgr" ]
76 if (current_os == "zephyr") {
77 test_sources += [ "TestKeyValueStoreMgr.cpp" ]
81 import("${chip_root}/build/chip/chip_test_group.gni")
82 chip_test_group("tests") {