13f4cbf05Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd. 23f4cbf05Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 33f4cbf05Sopenharmony_ci# you may not use this file except in compliance with the License. 43f4cbf05Sopenharmony_ci# You may obtain a copy of the License at 53f4cbf05Sopenharmony_ci# 63f4cbf05Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 73f4cbf05Sopenharmony_ci# 83f4cbf05Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 93f4cbf05Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 103f4cbf05Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 113f4cbf05Sopenharmony_ci# See the License for the specific language governing permissions and 123f4cbf05Sopenharmony_ci# limitations under the License. 133f4cbf05Sopenharmony_ciimport("//build/ohos.gni") 143f4cbf05Sopenharmony_ciimport("//build/test.gni") 153f4cbf05Sopenharmony_ci 163f4cbf05Sopenharmony_ciif (host_os == "linux" && !is_asan && !is_arkui_x) { 173f4cbf05Sopenharmony_ci config("module_private_config") { 183f4cbf05Sopenharmony_ci visibility = [ ":*" ] 193f4cbf05Sopenharmony_ci 203f4cbf05Sopenharmony_ci # library path 213f4cbf05Sopenharmony_ci lib_dirs = [ "libs" ] 223f4cbf05Sopenharmony_ci } 233f4cbf05Sopenharmony_ci 243f4cbf05Sopenharmony_ci group("unittest") { 253f4cbf05Sopenharmony_ci testonly = true 263f4cbf05Sopenharmony_ci deps = [] 273f4cbf05Sopenharmony_ci 283f4cbf05Sopenharmony_ci if (!use_clang_coverage) { 293f4cbf05Sopenharmony_ci deps += [ 303f4cbf05Sopenharmony_ci ":rust_utils_ashmem_test", 313f4cbf05Sopenharmony_ci ":rust_utils_file_test", 323f4cbf05Sopenharmony_ci ] 333f4cbf05Sopenharmony_ci } 343f4cbf05Sopenharmony_ci } 353f4cbf05Sopenharmony_ci 363f4cbf05Sopenharmony_ci ohos_rust_unittest("rust_utils_ashmem_test") { 373f4cbf05Sopenharmony_ci module_out_path = "utils/base/rust" 383f4cbf05Sopenharmony_ci sources = [ "rust_utils_ashmem_test.rs" ] 393f4cbf05Sopenharmony_ci configs = [ ":module_private_config" ] 403f4cbf05Sopenharmony_ci deps = [ "//commonlibrary/c_utils/base:utils_rust" ] 413f4cbf05Sopenharmony_ci } 423f4cbf05Sopenharmony_ci 433f4cbf05Sopenharmony_ci ohos_rust_unittest("rust_utils_file_test") { 443f4cbf05Sopenharmony_ci module_out_path = "utils/base/rust" 453f4cbf05Sopenharmony_ci sources = [ "rust_utils_file_test.rs" ] 463f4cbf05Sopenharmony_ci deps = [ 473f4cbf05Sopenharmony_ci "//commonlibrary/c_utils/base:utils_rust", 483f4cbf05Sopenharmony_ci "//third_party/rust/crates/cxx:lib", 493f4cbf05Sopenharmony_ci ] 503f4cbf05Sopenharmony_ci } 513f4cbf05Sopenharmony_ci 523f4cbf05Sopenharmony_ci ohos_rust_unittest("rust_utils_directory_test") { 533f4cbf05Sopenharmony_ci module_out_path = "utils/base/rust" 543f4cbf05Sopenharmony_ci sources = [ "rust_utils_directory_test.rs" ] 553f4cbf05Sopenharmony_ci deps = [ 563f4cbf05Sopenharmony_ci "//commonlibrary/c_utils/base:utils_rust", 573f4cbf05Sopenharmony_ci "//third_party/rust/crates/cxx:lib", 583f4cbf05Sopenharmony_ci ] 593f4cbf05Sopenharmony_ci } 603f4cbf05Sopenharmony_ci} 61