• 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.
13
14import("//build/test.gni")
15
16ohos_rust_unittest("rust_ylong_runtime_test_ut") {
17  module_out_path = "ylong_runtime/ylong_runtime"
18
19  rustflags = [
20    "--cfg=feature=\"fs\"",
21    "--cfg=feature=\"macros\"",
22    "--cfg=feature=\"net\"",
23    "--cfg=feature=\"sync\"",
24    "--cfg=feature=\"time\"",
25  ]
26
27  sources = [ "../ylong_runtime/src/lib.rs" ]
28  deps = [
29    "../ylong_io:ylong_io",
30    "../ylong_runtime_macros:ylong_runtime_macros(${host_toolchain})",
31    "//third_party/rust/crates/libc:lib",
32  ]
33}
34
35ohos_rust_systemtest("rust_ylong_runtime_test_sdv") {
36  module_out_path = "ylong_runtime/ylong_runtime"
37
38  rustflags = [
39    "--cfg=gn_test",
40    "--cfg=feature=\"fs\"",
41    "--cfg=feature=\"macros\"",
42    "--cfg=feature=\"net\"",
43    "--cfg=feature=\"sync\"",
44    "--cfg=feature=\"time\"",
45  ]
46
47  sources = [ "../ylong_runtime/tests/entry.rs" ]
48  deps = [ "../ylong_runtime:ylong_runtime" ]
49}
50
51group("unittest") {
52  testonly = true
53  deps = [ ":rust_ylong_runtime_test_ut" ]
54}
55
56group("sdvtest") {
57  testonly = true
58  deps = [ ":rust_ylong_runtime_test_sdv" ]
59}
60