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

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

  sources = [
    "AES_CCM_128_test_vectors.h",
    "CHIPCryptoPALTest.cpp",
    "DacValidationExplicitVectors.h",
    "DerSigConversion_test_vectors.h",
    "ECDH_P256_test_vectors.h",
    "HKDF_SHA256_test_vectors.h",
    "HMAC_SHA256_test_vectors.h",
    "Hash_SHA256_test_vectors.h",
    "PBKDF2_SHA256_test_vectors.h",
    "PBKDF2_SHA256_test_vectors.h",
    "RawIntegerToDer_test_vectors.h",
    "SPAKE2P_FE_MUL_test_vectors.h",
    "SPAKE2P_FE_RW_test_vectors.h",
    "SPAKE2P_HMAC_test_vectors.h",
    "SPAKE2P_POINT_MUL_ADD_test_vectors.h",
    "SPAKE2P_POINT_MUL_test_vectors.h",
    "SPAKE2P_POINT_RW_test_vectors.h",
    "SPAKE2P_POINT_VALID_test_vectors.h",
    "SPAKE2P_RFC_test_vectors.h",
    "TestCryptoLayer.h",
  ]

  test_sources = [
    "TestGroupOperationalCredentials.cpp",
    "TestSessionKeystore.cpp",
  ]

  if (chip_crypto == "psa") {
    test_sources += [ "TestPSAOpKeyStore.cpp" ]
  } else {
    test_sources += [ "TestPersistentStorageOpKeyStore.cpp" ]
  }

  if (chip_device_platform == "esp32" || chip_device_platform == "nrfconnect" ||
      chip_device_platform == "efr32" || chip_device_platform == "openiotsdk") {
    defines = [ "CURRENT_TIME_NOT_IMPLEMENTED=1" ]
  }

  cflags = [ "-Wconversion" ]

  public_deps = [
    "${chip_root}/src/credentials/tests:cert_test_vectors",
    "${chip_root}/src/crypto",
    "${chip_root}/src/lib/core",
    "${chip_root}/src/lib/support:testing",
    "${chip_root}/src/platform",
    "${nlunit_test_root}:nlunit-test",
  ]

  tests = [ "CHIPCryptoPALTest" ]
}
