1# Copyright (c) 2022 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/hilog" 17 18config("module_private_config") { 19 visibility = [ ":*" ] 20} 21 22ohos_unittest("HilogToolTest") { 23 module_out_path = module_output_path 24 25 sources = [ "hilogtool_test.cpp" ] 26 27 configs = [ 28 ":module_private_config", 29 "//base/hiviewdfx/hilog/frameworks/libhilog:libhilog_config", 30 ] 31 32 deps = [ "//third_party/googletest:gtest_main" ] 33 34 external_deps = [ 35 "c_utils:utils", 36 "hilog_native:libhilog", 37 ] 38} 39 40ohos_unittest("HilogUtilsTest") { 41 module_out_path = module_output_path 42 43 sources = [ "hilog_utils_test.cpp" ] 44 45 configs = [ 46 ":module_private_config", 47 "//base/hiviewdfx/hilog/frameworks/libhilog:libhilog_config", 48 ] 49 50 deps = [ "//third_party/googletest:gtest_main" ] 51 52 external_deps = [ 53 "c_utils:utils", 54 "hilog_native:libhilog", 55 ] 56} 57 58ohos_unittest("HilogPrintTest") { 59 module_out_path = module_output_path 60 61 sources = [ "hilog_print_test.cpp" ] 62 63 configs = [ 64 ":module_private_config", 65 "//base/hiviewdfx/hilog/frameworks/libhilog:libhilog_config", 66 ] 67 68 deps = [ "//third_party/googletest:gtest_main" ] 69 70 external_deps = [ 71 "c_utils:utils", 72 "hilog_native:libhilog", 73 ] 74} 75 76group("unittest") { 77 testonly = true 78 deps = [ 79 ":HilogPrintTest", 80 ":HilogToolTest", 81 ":HilogUtilsTest", 82 ] 83} 84