• 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 = [ "//third_party/googletest:gtest_main" ]
23
24  ohos_unittest("accesstokenid_test") {
25    module_out_path = module_output_path
26    sources = [ "unittest/accesstokenid/accesstokenid_test.cpp" ]
27    deps = linuxkerneltest_public_deps
28    part_name = "linux"
29    subsystem_name = "kernel"
30  }
31
32  script_dir = "kernel/linux/build/test/moduletest/runtest"
33  action("init_runtest") {
34    script = "init_runtest.sh"
35    outputs = [ "$root_build_dir/tests/kernel_shelltest/runtest.timestamp" ]
36    args = [
37      rebase_path("$root_build_dir/../../$script_dir"),
38      rebase_path("$root_build_dir/tests/kernel_shelltest"),
39    ]
40  }
41}
42
43group("linuxkerneltest") {
44  testonly = true
45  if (is_standard_system) {
46    deps = [
47      ":accesstokenid_test",
48      ":init_runtest",
49      "fuzztest:fuzztest",
50
51      #"kernel_ltp:HatsKernelTest",
52    ]
53  }
54}
55