# 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/appexecfwk/standard/appexecfwk.gni")
module_output_path = "appexecfwk_standard/ams"

ohos_systemtest("ams_page_ability_test") {
  module_out_path = module_output_path

  include_dirs = [
    "//foundation/distributedschedule/safwk/services/safwk/include",
    "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/include",
    "//third_party/jsoncpp/include",
  ]

  sources = [
    "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/event.cpp",
    "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/module_test_dump_util.cpp",
    "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/st_ability_util.cpp",
    "//foundation/appexecfwk/standard/test/systemtest/common/ams/tool/src/stoperator.cpp",
    "ams_page_ability_test.cpp",
  ]

  configs = [
    "${aafwk_path}/services/abilitymgr:abilityms_config",
    "${aafwk_path}/services/appmgr:appmgr_config",
  ]
  cflags = []
  if (target_cpu == "arm") {
    cflags += [ "-DBINDER_IPC_32BIT" ]
  }
  deps = [
    "${aafwk_path}/interfaces/innerkits/app_manager:app_manager",
    "${aafwk_path}/interfaces/innerkits/want:want",
    "${aafwk_path}/services/abilitymgr:abilityms",
    "${appexecfwk_path}/interfaces/innerkits/appexecfwk_base:appexecfwk_base",
    "${appexecfwk_path}/interfaces/innerkits/appexecfwk_core:appexecfwk_core",
    "${appexecfwk_path}/interfaces/innerkits/libeventhandler:libeventhandler",
    "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy:samgr_proxy",
    "//third_party/googletest:gtest_main",
    "//third_party/jsoncpp:jsoncpp",
    "//utils/native/base:utils",
  ]

  external_deps = [
    "ces_standard:cesfwk_core",
    "ces_standard:cesfwk_innerkits",
    "hiviewdfx_hilog_native:libhilog",
    "ipc:ipc_core",
  ]
}

group("systemtest") {
  testonly = true

  deps = [ ":ams_page_ability_test" ]
}
