# 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/nlunit_test.gni")

import("${chip_root}/build/chip/chip_test_suite.gni")
import("${chip_root}/src/app/icd/icd.gni")
import("${chip_root}/src/crypto/crypto.gni")
import("${chip_root}/src/platform/device.gni")

static_library("helpers") {
  output_name = "libAppTestHelpers"
  output_dir = "${root_out_dir}/lib"

  sources = [
    "${chip_root}/src/app/reporting/tests/MockReportScheduler.cpp",
    "AppTestContext.cpp",
    "AppTestContext.h",
    "integration/RequiredPrivilegeStubs.cpp",
  ]

  cflags = [ "-Wconversion" ]

  deps = [
    "${chip_root}/src/access",
    "${chip_root}/src/app",
    "${chip_root}/src/lib/support",
    "${chip_root}/src/messaging/tests:helpers",
    "${chip_root}/src/transport/raw/tests:helpers",
  ]
}

source_set("binding-test-srcs") {
  sources = [
    "${chip_root}/src/app/clusters/bindings/PendingNotificationMap.cpp",
    "${chip_root}/src/app/clusters/bindings/PendingNotificationMap.h",
    "${chip_root}/src/app/util/binding-table.cpp",
    "${chip_root}/src/app/util/binding-table.h",
  ]

  public_deps = [
    "${chip_root}/src/app/util/mock:mock_ember",
    "${chip_root}/src/lib/core",
  ]
}

source_set("ota-requestor-test-srcs") {
  sources = [
    "${chip_root}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp",
    "${chip_root}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.h",
    "${chip_root}/src/app/clusters/ota-requestor/OTARequestorStorage.h",
  ]

  public_deps = [
    "${chip_root}/src/app/common:cluster-objects",
    "${chip_root}/src/lib/core",
  ]
}

source_set("time-sync-data-provider-test-srcs") {
  sources = [ "${chip_root}/src/app/clusters/time-synchronization-server/TimeSyncDataProvider.cpp" ]

  public_deps = [
    "${chip_root}/src/app/common:cluster-objects",
    "${chip_root}/src/lib/core",
  ]
}

source_set("power-cluster-test-srcs") {
  sources = [
    "${chip_root}/src/app/clusters/power-source-server/power-source-server.cpp",
  ]

  public_deps = [
    "${chip_root}/src/app/common:cluster-objects",
    "${chip_root}/src/app/util/mock:mock_ember",
    "${chip_root}/src/lib/core",
  ]
}

source_set("scenes-table-test-srcs") {
  sources = [
    "${chip_root}/src/app/clusters/scenes-server/ExtensionFieldSets.h",
    "${chip_root}/src/app/clusters/scenes-server/ExtensionFieldSetsImpl.cpp",
    "${chip_root}/src/app/clusters/scenes-server/ExtensionFieldSetsImpl.h",
    "${chip_root}/src/app/clusters/scenes-server/SceneHandlerImpl.cpp",
    "${chip_root}/src/app/clusters/scenes-server/SceneHandlerImpl.h",
    "${chip_root}/src/app/clusters/scenes-server/SceneTable.h",
    "${chip_root}/src/app/clusters/scenes-server/SceneTableImpl.cpp",
    "${chip_root}/src/app/clusters/scenes-server/SceneTableImpl.h",
  ]

  public_deps = [
    "${chip_root}/src/app",
    "${chip_root}/src/app/common:cluster-objects",
    "${chip_root}/src/app/util/mock:mock_ember",
    "${chip_root}/src/lib/core",
  ]
}

source_set("operational-state-test-srcs") {
  sources = [ "${chip_root}/src/app/clusters/operational-state-server/operational-state-cluster-objects.h" ]

  public_deps = [
    "${chip_root}/src/app/common:cluster-objects",
    "${chip_root}/src/lib/core",
  ]
}

chip_test_suite_using_nltest("tests") {
  output_name = "libAppTests"

  test_sources = [
    "TestAclEvent.cpp",
    "TestAttributePathExpandIterator.cpp",
    "TestAttributePersistenceProvider.cpp",
    "TestAttributeValueDecoder.cpp",
    "TestAttributeValueEncoder.cpp",
    "TestBasicCommandPathRegistry.cpp",
    "TestBindingTable.cpp",
    "TestBuilderParser.cpp",
    "TestClusterInfo.cpp",
    "TestCommandInteraction.cpp",
    "TestCommandPathParams.cpp",
    "TestConcreteAttributePath.cpp",
    "TestDataModelSerialization.cpp",
    "TestDefaultOTARequestorStorage.cpp",
    "TestEventLoggingNoUTCTime.cpp",
    "TestEventOverflow.cpp",
    "TestEventPathParams.cpp",
    "TestFabricScopedEventLogging.cpp",
    "TestInteractionModelEngine.cpp",
    "TestMessageDef.cpp",
    "TestNullable.cpp",
    "TestNumericAttributeTraits.cpp",
    "TestOperationalStateClusterObjects.cpp",
    "TestPendingNotificationMap.cpp",
    "TestPendingResponseTrackerImpl.cpp",
    "TestPowerSourceCluster.cpp",
    "TestReadInteraction.cpp",
    "TestReportingEngine.cpp",
    "TestStatusIB.cpp",
    "TestStatusResponseMessage.cpp",
    "TestTestEventTriggerDelegate.cpp",
    "TestTimeSyncDataProvider.cpp",
    "TestTimedHandler.cpp",
    "TestWriteInteraction.cpp",
  ]

  if (!chip_fake_platform) {
    test_sources += [ "TestFailSafeContext.cpp" ]
  }

  test_sources += [ "TestAclAttribute.cpp" ]

  # DefaultICDClientStorage assumes that raw AES key is used by the application
  if (chip_crypto != "psa") {
    test_sources += [ "TestDefaultICDClientStorage.cpp" ]
  }

  #
  # On NRF platforms, the allocation of a large number of pbufs in this test
  # to exercise chunking causes it to run out of memory. For now, disable it there.
  #
  if (chip_device_platform != "nrfconnect") {
    test_sources += [ "TestBufferedReadCallback.cpp" ]
    test_sources += [ "TestClusterStateCache.cpp" ]
  }

  # On NRF, Open IoT SDK and fake platforms we do not have a realtime clock available, so
  # TestEventLogging.cpp would be testing the same thing as
  # TestEventLoggingNoUTCTime, but it's not set up to deal with the timestamps
  # being that low.
  if (chip_device_platform != "nrfconnect" &&
      chip_device_platform != "openiotsdk" && chip_device_platform != "fake") {
    test_sources += [ "TestEventLogging.cpp" ]
  }

  # The platform manager is not properly clearing queues in test teardown, which results in
  # DrainIO calls not being able to run in expected time (5seconds) if unprocessed reported engine
  # runs are remaining, causing tests to crash in Open IoT SDK and Zephyr tests since they are
  # running all tests in one file. We need to figure out how to properly clean the event queues
  # before enabling this test for these platforms.
  if (chip_device_platform != "nrfconnect" &&
      chip_device_platform != "openiotsdk") {
    test_sources += [ "TestReportScheduler.cpp" ]
  }

  cflags = [ "-Wconversion" ]

  public_deps = [
    ":binding-test-srcs",
    ":operational-state-test-srcs",
    ":ota-requestor-test-srcs",
    ":time-sync-data-provider-test-srcs",
    "${chip_root}/src/app",
    "${chip_root}/src/app/common:cluster-objects",
    "${chip_root}/src/app/icd/client:manager",
    "${chip_root}/src/app/tests:helpers",
    "${chip_root}/src/app/util/mock:mock_ember",
    "${chip_root}/src/lib/core",
    "${chip_root}/src/lib/support:test_utils",
    "${chip_root}/src/lib/support:testing",
    "${chip_root}/src/lib/support:testing_nlunit",
    "${nlunit_test_root}:nlunit-test",
  ]

  if (chip_enable_icd_server) {
    public_deps += [ "${chip_root}/src/app/icd/server:manager" ]

    test_sources += [ "TestICDManager.cpp" ]
  }

  if (chip_enable_icd_checkin) {
    test_sources += [ "TestICDMonitoringTable.cpp" ]
  }

  if (chip_device_platform != "android") {
    test_sources += [
      "TestExtensionFieldSets.cpp",
      "TestSceneTable.cpp",
    ]
    public_deps += [
      ":power-cluster-test-srcs",
      ":scenes-table-test-srcs",
    ]
  }

  # Do not run TestCommissionManager when running ICD specific unit tests.
  # ICDManager has a dependency on the Accessors.h file which causes a link error
  # when building the TestCommissionManager
  if (chip_config_network_layer_ble &&
      (chip_device_platform == "linux" || chip_device_platform == "darwin")) {
    test_sources += [ "TestCommissionManager.cpp" ]
    public_deps += [
      "${chip_root}/src/app/server",
      "${chip_root}/src/messaging/tests/echo:common",
    ]
  }

  if (chip_persist_subscriptions) {
    test_sources += [ "TestSimpleSubscriptionResumptionStorage.cpp" ]
  }
}
