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_external_deps = [ 21 "c_utils:utils", 22 "hilog:libhilog", 23 "memory_utils:libpurgeablemem", 24] 25 26ohos_unittest("purgeable_c_test") { 27 module_out_path = module_output_path 28 sources = [ "purgeable_c_test.cpp" ] 29 if (is_standard_system) { 30 external_deps = purgeable_external_deps 31 } 32 33 subsystem_name = "commonlibrary" 34 part_name = "memory_utils" 35} 36 37ohos_unittest("purgeable_cpp_test") { 38 module_out_path = module_output_path 39 sources = [ "purgeable_cpp_test.cpp" ] 40 if (is_standard_system) { 41 external_deps = purgeable_external_deps 42 } 43 44 subsystem_name = "commonlibrary" 45 part_name = "memory_utils" 46} 47 48ohos_unittest("purgeableashmem_test") { 49 module_out_path = module_output_path 50 sources = [ "purgeableashmem_test.cpp" ] 51 if (is_standard_system) { 52 external_deps = purgeable_external_deps 53 } 54 55 subsystem_name = "commonlibrary" 56 part_name = "memory_utils" 57} 58 59group("libpurgeablemem_test") { 60 testonly = true 61 deps = [ 62 ":purgeable_c_test", 63 ":purgeable_cpp_test", 64 ":purgeableashmem_test", 65 ] 66} 67