1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//base/notification/common_event_service/event.gni")
15import("//build/test.gni")
16
17module_output_path = "common_event_service/tools"
18
19config("tools_cem_test_config") {
20  include_dirs = [ "${tools_path}/cem/include" ]
21}
22
23ohos_systemtest("common_event_command_dump_system_test") {
24  module_out_path = module_output_path
25
26  sources = [ "common_event_command_dump_system_test.cpp" ]
27
28  configs = [ ":tools_cem_test_config" ]
29
30  cflags = []
31  if (target_cpu == "arm") {
32    cflags += [ "-DBINDER_IPC_32BIT" ]
33  }
34
35  deps = [
36    "${ces_core_path}:cesfwk_core",
37    "${ces_native_path}:cesfwk_innerkits",
38    "//third_party/googletest:gtest_main",
39  ]
40
41  external_deps = [
42    "ability_base:want",
43    "bundle_framework:appexecfwk_core",
44    "c_utils:utils",
45    "eventhandler:libeventhandler",
46    "hilog:libhilog",
47    "ipc:ipc_core",
48  ]
49}
50
51ohos_systemtest("common_event_command_publish_system_test") {
52  sanitize = {
53    integer_overflow = true
54    ubsan = true
55    boundary_sanitize = true
56    cfi = true
57    cfi_cross_dso = true
58    debug = false
59  }
60  module_out_path = module_output_path
61
62  include_dirs = [ "${ability_runtime_path}/tools/test/systemtest/aa" ]
63
64  sources = [ "common_event_command_publish_system_test.cpp" ]
65
66  configs = [ ":tools_cem_test_config" ]
67
68  cflags = []
69  if (target_cpu == "arm") {
70    cflags += [ "-DBINDER_IPC_32BIT" ]
71  }
72
73  deps = [
74    "${ces_core_path}:cesfwk_core",
75    "${ces_native_path}:cesfwk_innerkits",
76    "//third_party/googletest:gtest_main",
77  ]
78
79  external_deps = [
80    "ability_base:want",
81    "access_token:libnativetoken",
82    "access_token:libtoken_setproc",
83    "bundle_framework:appexecfwk_core",
84    "c_utils:utils",
85    "eventhandler:libeventhandler",
86    "hilog:libhilog",
87    "ipc:ipc_core",
88  ]
89}
90
91group("systemtest") {
92  testonly = true
93
94  deps = [
95    ":common_event_command_dump_system_test",
96    ":common_event_command_publish_system_test",
97  ]
98}
99