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/ohos.gni") 15import("//build/ohos_var.gni") 16import("//build/test.gni") 17 18module_output_path = "libpurgeablemem/" 19 20purgeable_deps = [ 21 "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", 22 "//commonlibrary/memory_utils/libpurgeablemem:libpurgeablemem", 23] 24 25purgeable_external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 26 27purgeable_public_deps = [ "//third_party/googletest:gtest_main" ] 28 29ohos_unittest("purgeable_c_test") { 30 module_out_path = module_output_path 31 sources = [ "purgeable_c_test.cpp" ] 32 deps = purgeable_deps 33 if (is_standard_system) { 34 external_deps = purgeable_external_deps 35 public_deps = purgeable_public_deps 36 } 37 38 subsystem_name = "commonlibrary" 39 part_name = "memory_utils" 40} 41 42ohos_unittest("purgeable_cpp_test") { 43 module_out_path = module_output_path 44 sources = [ "purgeable_cpp_test.cpp" ] 45 deps = purgeable_deps 46 if (is_standard_system) { 47 external_deps = purgeable_external_deps 48 public_deps = purgeable_public_deps 49 } 50 51 subsystem_name = "commonlibrary" 52 part_name = "memory_utils" 53} 54 55group("libpurgeablemem_test") { 56 testonly = true 57 deps = [ 58 ":purgeable_c_test", 59 ":purgeable_cpp_test", 60 ] 61} 62