# Copyright (c) 2022 Huawei Device Co., Ltd.
# 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/ohos.gni")
import("//foundation/aafwk/standard/idl/idl.gni")

config("ipc_test_config") {
  include_dirs = [
    "//utils/native/base/include",
    "${IDL_TEST_DIR}/include",
    "${IPC_SUBSYSTEM_DIR}/utils/include",
    "${IPC_SUBSYSTEM_DIR}/ipc/native/src/mock/include",
  ]
}

ohos_executable("idl_server_test") {
  sources = [
    "./src/idl_test_service_stub.cpp",
    "./src/main_server.cpp",
    "./src/test_service.cpp",
  ]

  configs = [ ":ipc_test_config" ]

  deps = [ "//utils/native/base:utils" ]

  external_deps = [
    "hiviewdfx_hilog_native:libhilog",
    "ipc:ipc_core",
    "samgr_standard:samgr_proxy",
  ]

  subsystem_name = "aafwk"
  part_name = "idl"
}

ohos_executable("idl_client_test") {
  sources = [
    "./src/idl_test_service_proxy.cpp",
    "./src/main_client.cpp",
    "./src/test_client.cpp",
  ]

  configs = [ ":ipc_test_config" ]

  deps = [ "//utils/native/base:utils" ]

  external_deps = [
    "hiviewdfx_hilog_native:libhilog",
    "ipc:ipc_core",
    "samgr_standard:samgr_proxy",
  ]

  subsystem_name = "aafwk"
  part_name = "idl"
}
