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 ] 28 if (is_ohos) { 29 cflags_cc = [ "-D__XCOLLIE_OHOS__" ] 30 } 31} 32 33##############################unittest########################################## 34ohos_moduletest("XCollieTimeoutModuleTest") { 35 module_out_path = module_output_path 36 sources = [ 37 "${hicollie_part_path}/frameworks/native/watchdog_inner.cpp", 38 "${hicollie_part_path}/frameworks/native/watchdog_task.cpp", 39 "${hicollie_part_path}/frameworks/native/xcollie_utils.cpp", 40 "xcollie_timeout_test.cpp", 41 ] 42 43 configs = [ ":module_private_config" ] 44 45 deps = [ "//third_party/googletest:gtest_main" ] 46 47 external_deps = [ 48 "c_utils:utils", 49 "hilog:libhilog", 50 "hisysevent:libhisysevent", 51 ] 52} 53 54############################################################################### 55group("moduletest") { 56 testonly = true 57 deps = [ 58 # deps file 59 ":XCollieTimeoutModuleTest", 60 ] 61} 62############################################################################### 63