# Copyright (c) 2021-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")

config("fmsSystemTestHostNormalBConfig") {
  visibility = [ ":*" ]
  include_dirs = [
    "include",
    "../tool/include",
    "test/systemtest/common/fms/common/include",
    "${ability_runtime_path}/interfaces/innerkits/ability_manager/include",
    "${ability_base_innerapi_path}/uri/include",
    "${ability_base_innerapi_path}/want/include",
    "${ability_runtime_path}/services/abilitymgr/include",
    "${ability_runtime_path}/services/common/include",
    "${bundlefwk_innerkits_path}/libeventhandler/include",
    "${ability_runtime_path}/frameworks/kits/appkit/native/app",
    "${bundlefwk_path}/services/bundlemgr/include",
    "${ability_runtime_path}/interfaces/innerkits/app_manager/include/appmgr",
    "//third_party/jsoncpp/include",
    "${distributedschedule_path}/safwk/services/safwk/include",
  ]
  defines = [
    "AMS_LOG_TAG = \"formManagerSystemTest\"",
    "AMS_LOG_DOMAIN = 0xD002666",
  ]
}
ohos_shared_library("fmsSystemTestHostNormalB") {
  sources = [
    "../tool/src/form_test_utils.cpp",
    "src/form_ability_b.cpp",
    "test/systemtest/common/fms/common/src/form_event.cpp",
    "test/systemtest/common/fms/common/src/system_test_form_util.cpp",
  ]
  cflags = []
  if (target_cpu == "arm") {
    cflags += [ "-DBINDER_IPC_32BIT" ]
  }
  configs = [
    ":fmsSystemTestHostNormalBConfig",
    "${ability_runtime_path}/services/abilitymgr:abilityms_config",
    "${ability_runtime_path}/services/appmgr:appmgr_config",
  ]
  deps = [
    "${ability_runtime_path}/frameworks/kits/ability/native:abilitykit_native",
    "${ability_runtime_path}/frameworks/kits/appkit:appkit_native",
    "${ability_runtime_path}/interfaces/innerkits/ability_manager:ability_manager",
    "${ability_runtime_path}/services/abilitymgr:abilityms",
    "${bundlefwk_path}/services/bundlemgr:libbms",
    "//third_party/jsoncpp:jsoncpp",
    "//utils/native/base:utilsbase",
  ]
  external_deps = [
    "ability_base:base",
    "ability_base:want",
    "ability_base:zuri",
    "ability_runtime:app_manager",
    "bundle_framework:appexecfwk_base",
    "bundle_framework:appexecfwk_core",
    "common_event_service:cesfwk_core",
    "common_event_service:cesfwk_innerkits",
    "form_runtime:form_manager",
    "hiviewdfx_hilog_native:libhilog",
    "ipc:ipc_core",
    "safwk:system_ability_fwk",
    "samgr_standard:samgr_proxy",
  ]
  subsystem_name = "formsystemtestability"
}
