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("//build/test.gni") 15 16module_output_path = "hiviewdfx/hicollie" 17hicollie_part_path = "//base/hiviewdfx/hicollie" 18 19############################################################################### 20config("module_private_config") { 21 visibility = [ ":*" ] 22 include_dirs = [ 23 ".", 24 "${hicollie_part_path}/frameworks/native", 25 "${hicollie_part_path}/frameworks/native/test", 26 "${hicollie_part_path}/interfaces/native/innerkits/include/xcollie", 27 "//commonlibrary/c_utils/base/include", 28 ] 29 if (is_ohos) { 30 cflags_cc = [ "-D__XCOLLIE_OHOS__" ] 31 } 32} 33 34##############################unittest########################################## 35ohos_moduletest("XCollieTimeoutModuleTest") { 36 module_out_path = module_output_path 37 sources = [ 38 "${hicollie_part_path}/frameworks/native/watchdog_inner.cpp", 39 "${hicollie_part_path}/frameworks/native/watchdog_task.cpp", 40 "${hicollie_part_path}/frameworks/native/xcollie_utils.cpp", 41 "xcollie_timeout_test.cpp", 42 ] 43 44 configs = [ ":module_private_config" ] 45 46 deps = [ "//third_party/googletest:gtest_main" ] 47 48 external_deps = [ 49 "c_utils:utils", 50 "hilog:libhilog", 51 "hisysevent:libhisysevent", 52 ] 53} 54 55############################################################################### 56group("moduletest") { 57 testonly = true 58 deps = [ 59 # deps file 60 ":XCollieTimeoutModuleTest", 61 ] 62} 63############################################################################### 64