# Copyright (c) 2021 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/test.gni")
import("//foundation/aafwk/standard/aafwk.gni")
module_output_path = "ability_runtime/ability_call_test"

###############################################################################
#1. intent(c++) get/set test without transport

config("module_private_config") {
  visibility = [ ":*" ]
  cflags = []
  if (target_cpu == "arm") {
    cflags += [ "-DBINDER_IPC_32BIT" ]
  }
  include_dirs = [
    "//foundation/aafwk/standard/frameworks/kits/ability/ability_runtime/test/mock/AMS",
    "//foundation/aafwk/standard/frameworks/kits/ability/ability_runtime/test/mock/Ability/include",
    "//foundation/aafwk/standard/frameworks/kits/ability/ability_runtime/test/mock/BMS/include",
    "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core/include/bundlemgr/",
    "//foundation/distributedschedule/safwk/services/safwk/include",
  ]
}

ohos_moduletest("ability_caller_fw_module_test") {
  module_out_path = module_output_path
  sources = [
    "//foundation/aafwk/standard/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_ability_manager_client.cpp",
    "//foundation/aafwk/standard/frameworks/kits/ability/ability_runtime/test/mock/AMS/mock_serviceability_manager_service.cpp",
    "//foundation/aafwk/standard/frameworks/kits/ability/native/test/mock/include/sys_mgr_client_mock.cpp",
    "moduletest/ability_caller_fw_module_test.cpp",
  ]

  configs = [ ":module_private_config" ]

  deps = [
    "//foundation/aafwk/standard/frameworks/kits/ability/ability_runtime:ability_context_native",
    "//foundation/aafwk/standard/frameworks/kits/ability/native:abilitykit_native",
    "//foundation/aafwk/standard/frameworks/kits/appkit:appkit_native",
    "//foundation/aafwk/standard/interfaces/innerkits/ability_manager:ability_manager",
    "//foundation/aafwk/standard/interfaces/innerkits/base:base",
    "//foundation/aafwk/standard/interfaces/innerkits/want:want",
    "//foundation/appexecfwk/standard/common:libappexecfwk_common",
    "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_base:appexecfwk_base",
    "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core:appexecfwk_core",
    "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
    "//third_party/googletest:gmock_main",
    "//third_party/googletest:gtest_main",
  ]

  external_deps = [
    "hiviewdfx_hilog_native:libhilog",
    "ipc:ipc_core",
    "multimodalinput_base:libmmi-client",
    "native_appdatamgr:native_appdatafwk",
    "native_appdatamgr:native_dataability",
    "native_appdatamgr:native_rdb",
  ]
}

################################################################################
group("moduletest") {
  testonly = true

  deps = []
  deps += [ ":ability_caller_fw_module_test" ]

  # if (is_phone_product) {
  #   deps += [ ":ability_caller_fw_module_test" ]
  # }
}
