# 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("//build_overrides/pigweed.gni")

import("${chip_root}/build/chip/chip_test_suite.gni")

chip_test_suite("tests") {
  output_name = "libControllerTests"

  test_sources = [ "TestCommissionableNodeController.cpp" ]

  if (chip_device_platform != "mbed" && chip_device_platform != "efr32" &&
      chip_device_platform != "esp32") {
    test_sources += [ "TestServerCommandDispatch.cpp" ]
    test_sources += [ "TestEventChunking.cpp" ]
    test_sources += [ "TestEventCaching.cpp" ]
    test_sources += [ "TestReadChunking.cpp" ]
    test_sources += [ "TestWriteChunking.cpp" ]
    test_sources += [ "TestEventNumberCaching.cpp" ]
    test_sources += [ "TestCommissioningWindowOpener.cpp" ]
  }

  cflags = [ "-Wconversion" ]

  public_deps = [
    "${chip_root}/src/app/common:cluster-objects",
    "${chip_root}/src/app/tests:helpers",
    "${chip_root}/src/controller",
    "${chip_root}/src/lib/core:string-builder-adapters",
    "${chip_root}/src/lib/support:test_utils",
    "${chip_root}/src/messaging/tests:helpers",
    "${chip_root}/src/transport/raw/tests:helpers",
  ]

  if (chip_device_platform != "mbed") {
    public_deps += [ "${chip_root}/src/controller/data_model" ]
  }
}
