1# Copyright (c) 2023 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. 13import("//build/ohos.gni") 14import("//build/test.gni") 15 16if (host_os == "linux" && !is_asan && !is_arkui_x) { 17 config("module_private_config") { 18 visibility = [ ":*" ] 19 20 # library path 21 lib_dirs = [ "libs" ] 22 } 23 24 group("unittest") { 25 testonly = true 26 deps = [] 27 28 if (!use_clang_coverage) { 29 deps += [ 30 ":rust_utils_ashmem_test", 31 ":rust_utils_directory_test", 32 ":rust_utils_file_test", 33 ] 34 } 35 } 36 37 ohos_rust_unittest("rust_utils_ashmem_test") { 38 module_out_path = "c_utils/c_utils/rust" 39 sources = [ "rust_utils_ashmem_test.rs" ] 40 configs = [ ":module_private_config" ] 41 deps = [ "//commonlibrary/c_utils/base:utils_rust" ] 42 } 43 44 ohos_rust_unittest("rust_utils_file_test") { 45 module_out_path = "c_utils/c_utils/rust" 46 sources = [ "rust_utils_file_test.rs" ] 47 deps = [ "//commonlibrary/c_utils/base:utils_rust" ] 48 external_deps = [ "rust_cxx:lib" ] 49 } 50 51 ohos_rust_unittest("rust_utils_directory_test") { 52 module_out_path = "c_utils/c_utils/rust" 53 sources = [ "rust_utils_directory_test.rs" ] 54 deps = [ "//commonlibrary/c_utils/base:utils_rust" ] 55 56 external_deps = [ "rust_cxx:lib" ] 57 } 58} 59