# 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/ohos.gni")
SUBDEMOSYSTEM_DIR =
    "test/resource/amssystemtestability/abilitySrc/amsAbilityAppendTestB"
SUBST_TOOLS_DIR = "test/resource/amssystemtestability/abilitySrc/tools"
config("amsAbilityAppendTestBConfig") {
  visibility = [ ":*" ]
  include_dirs = [
    "${SUBDEMOSYSTEM_DIR}/include",
    "${aafwk_path}/frameworks/kits/appkit/native/app",
    "${aafwk_path}/interfaces/innerkits/ability_manager/include",
    "${ability_base_innerapi_path}/uri/include",
    "${ability_base_innerapi_path}/want/include",
    "${innerkits_path}/libeventhandler/include",
    "${services_path}/bundlemgr/include",
    "${aafwk_path}/services/abilitymgr/include",
    "${common_path}/log/include",
    "${SUBST_TOOLS_DIR}/include",
    "//third_party/jsoncpp/include",
  ]
  defines = [
    "AMS_LOG_TAG = \"amsAbilityAppendTestB\"",
    "AMS_LOG_DOMAIN = 0xD002200",
  ]
  cflags = []
  if (target_cpu == "arm") {
    cflags += [ "-DBINDER_IPC_32BIT" ]
  }
}
ohos_shared_library("amsAbilityAppendTestB") {
  sources = [
    "${SUBDEMOSYSTEM_DIR}/src/main_ability.cpp",
    "${SUBDEMOSYSTEM_DIR}/src/test_utils.cpp",
  ]
  configs = [ ":amsAbilityAppendTestBConfig" ]
  deps = [
    "${aafwk_path}/frameworks/kits/ability/native:abilitykit_native",
    "${aafwk_path}/frameworks/kits/appkit:appkit_native",
    "${aafwk_path}/interfaces/innerkits/app_manager:app_manager",
    "${ability_base_path}:want",
    "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/dataability:native_dataability",
    "${distributeddatamgr_path}/appdatamgr/interfaces/inner_api/native/rdb:native_rdb",
    "${inner_api_path}/appexecfwk_base:appexecfwk_base",
    "${services_path}/bundlemgr:libbms",
    "//third_party/jsoncpp:jsoncpp",
    "//utils/native/base:utilsbase",
  ]
  external_deps = [
    "ability_base:zuri",
    "bundle_framework:appexecfwk_core",
    "common_event_service:cesfwk_innerkits",
    "hiviewdfx_hilog_native:libhilog",
    "ipc:ipc_core",
  ]
  subsystem_name = "amssystemtestability"
}
