• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 && !build_cross_platform_version) {
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    deps += [
29      ":rust_utils_ashmem_test",
30      ":rust_utils_directory_test",
31      ":rust_utils_file_test",
32    ]
33  }
34
35  ohos_rust_unittest("rust_utils_ashmem_test") {
36    module_out_path = "utils/base/rust"
37    sources = [ "rust_utils_ashmem_test.rs" ]
38    configs = [ ":module_private_config" ]
39    deps = [ "//commonlibrary/c_utils/base:utils_rust" ]
40  }
41
42  ohos_rust_unittest("rust_utils_file_test") {
43    module_out_path = "utils/base/rust"
44    sources = [ "rust_utils_file_test.rs" ]
45    deps = [
46      "//commonlibrary/c_utils/base:utils_rust",
47      "//third_party/rust/crates/cxx:lib",
48    ]
49  }
50
51  ohos_rust_unittest("rust_utils_directory_test") {
52    module_out_path = "utils/base/rust"
53    sources = [ "rust_utils_directory_test.rs" ]
54    deps = [
55      "//commonlibrary/c_utils/base:utils_rust",
56      "//third_party/rust/crates/cxx:lib",
57    ]
58  }
59}
60