# 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_configs = [ "${chip_root}/src/lib/support/pw_log_chip:config" ]

  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" ]
  }
}
