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