1# Copyright (c) 2024 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 16ohos_rust_unittest("rust_ipc_ut_test") { 17 module_out_path = "ipc/ipc_rust" 18 19 sources = [ "../src/lib.rs" ] 20 deps = [ 21 "../../rust:ipc_rust_cxx", 22 "//third_party/rust/crates/cxx:lib", 23 ] 24 25 external_deps = [ 26 "hilog:hilog_rust", 27 "ylong_runtime:ylong_runtime", 28 ] 29 30 subsystem_name = "communication" 31 part_name = "ipc" 32} 33 34ohos_rust_unittest("rust_ipc_sdv_test") { 35 module_out_path = "ipc/ipc_rust" 36 37 rustflags = [ "--cfg=gn_test" ] 38 39 sources = [ "entry.rs" ] 40 41 deps = [ 42 "../../rust:ipc_rust", 43 "c:ipc_rust_test_c", 44 ] 45 46 external_deps = [ 47 "access_token:libnativetoken", 48 "access_token:libtoken_setproc", 49 "hilog:hilog_rust", 50 "samgr:samgr_rust", 51 ] 52 53 subsystem_name = "communication" 54 part_name = "ipc" 55} 56 57group("unittest") { 58 testonly = true 59 deps = [ 60 ":rust_ipc_sdv_test", 61 ":rust_ipc_ut_test", 62 ] 63} 64