# 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")
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",
  ]

  cflags = [ "-Wconversion" ]

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

  public_deps = [
    "${chip_root}/src/lib/support/tests:pw-test-macros",
    "${chip_root}/src/messaging/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_codegen_data_model",
    "${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("thread-network-directory-test-srcs") {
  sources = [
    "${chip_root}/src/app/clusters/thread-network-directory-server/DefaultThreadNetworkDirectoryStorage.cpp",
    "${chip_root}/src/app/clusters/thread-network-directory-server/DefaultThreadNetworkDirectoryStorage.h",
    "${chip_root}/src/app/clusters/thread-network-directory-server/ThreadNetworkDirectoryStorage.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_codegen_data_model",
    "${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_codegen_data_model",
    "${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",
  ]
}

source_set("thread-border-router-management-test-srcs") {
  sources = [
    "${chip_root}/src/app/clusters/thread-border-router-management-server/thread-border-router-management-server.cpp",
    "${chip_root}/src/app/clusters/thread-border-router-management-server/thread-border-router-management-server.h",
    "${chip_root}/src/app/clusters/thread-border-router-management-server/thread-br-delegate.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("ecosystem-information-test-srcs") {
  sources = [
    "${chip_root}/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp",
    "${chip_root}/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h",
  ]
  public_deps = [
    "${chip_root}/src/app:interaction-model",
    "${chip_root}/src/app/common:cluster-objects",
    "${chip_root}/src/lib/core",
  ]
}

source_set("app-test-stubs") {
  sources = [
    "test-ember-api.cpp",
    "test-ember-api.h",

    # The overrides in these files are overrides from ember generated code
    # and the data model interface is NOT aware of such functionality
    #
    # TODO: ideally tests should have been written via mock ember, however mock ember did
    #       not exist at that time. We should completely re-write how these tests access
    #       the data via the DataModel interface
    "test-interaction-model-api.cpp",
    "test-interaction-model-api.h",
  ]

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

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

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

  cflags = [ "-Wconversion" ]

  public_deps = [
    ":app-test-stubs",
    ":binding-test-srcs",
    ":ecosystem-information-test-srcs",
    ":operational-state-test-srcs",
    ":ota-requestor-test-srcs",
    ":power-cluster-test-srcs",
    ":thread-network-directory-test-srcs",
    ":time-sync-data-provider-test-srcs",
    "${chip_root}/src/app",
    "${chip_root}/src/app/codegen-data-model-provider:instance-header",
    "${chip_root}/src/app/common:cluster-objects",
    "${chip_root}/src/app/data-model-provider/tests:encode-decode",
    "${chip_root}/src/app/icd/client:handler",
    "${chip_root}/src/app/icd/client:manager",
    "${chip_root}/src/app/tests:helpers",
    "${chip_root}/src/app/util/mock:mock_codegen_data_model",
    "${chip_root}/src/app/util/mock:mock_ember",
    "${chip_root}/src/lib/core",
    "${chip_root}/src/lib/core:string-builder-adapters",
    "${chip_root}/src/lib/support:test_utils",
    "${chip_root}/src/lib/support:testing",
    "${chip_root}/src/lib/support/tests:pw-test-macros",
  ]

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

  if (chip_config_network_layer_ble &&
      (chip_device_platform == "linux" || chip_device_platform == "darwin")) {
    test_sources += [ "TestCommissioningWindowManager.cpp" ]
    public_deps += [
      "${chip_root}/src/app/server",
      "${chip_root}/src/messaging/tests/echo:common",
    ]
  } else if (!chip_fake_platform) {
    test_sources += [ "TestThreadBorderRouterManagementCluster.cpp" ]
    public_deps += [ ":thread-border-router-management-test-srcs" ]
  }

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

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

  if (chip_persist_subscriptions) {
    test_sources += [ "TestSimpleSubscriptionResumptionStorage.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" ]
  }
}
