• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2022 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/ohos.gni")
15import("//build/ohos_var.gni")
16if (is_standard_system) {
17  import("//build/test.gni")
18}
19
20if (is_standard_system) {
21  module_output_path = "linuxkerneltest/"
22  linuxkerneltest_public_deps = [
23    "//third_party/bounds_checking_function:libsec_shared",
24    "//third_party/googletest:gtest_main",
25  ]
26
27  ohos_unittest("accesstokenid_test") {
28    module_out_path = module_output_path
29    sources = [ "unittest/accesstokenid/accesstokenid_test.cpp" ]
30    deps = linuxkerneltest_public_deps
31    part_name = "linux"
32    subsystem_name = "kernel"
33  }
34
35  ohos_unittest("rtg_test") {
36    module_out_path = module_output_path
37    sources = [ "unittest/rtg/rtg_test.cpp" ]
38    deps = linuxkerneltest_public_deps
39    part_name = "linux"
40    subsystem_name = "kernel"
41  }
42
43  script_dir = "kernel/linux/build/test/moduletest/runtest"
44  action("init_runtest") {
45    script = "init_runtest.sh"
46    outputs = [ "$root_build_dir/tests/kernel_shelltest/runtest.timestamp" ]
47    args = [
48      rebase_path("$root_build_dir/../../$script_dir"),
49      rebase_path("$root_build_dir/tests/kernel_shelltest"),
50    ]
51  }
52}
53
54group("linuxkerneltest") {
55  testonly = true
56  if (is_standard_system) {
57    deps = [
58      ":accesstokenid_test",
59      ":init_runtest",
60      ":rtg_test",
61      "fuzztest:fuzztest",
62
63      #"kernel_ltp:HatsKernelTest",
64    ]
65  }
66}
67