• 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
14#####################hydra-fuzz###################
15import("//build/config/features.gni")
16import("//build/ohos.gni")
17import("//build/test.gni")
18module_output_path = "safwk/safwk"
19safwk_dir = "../../.."
20safwk_services_dir = "${safwk_dir}/services/safwk/src"
21
22config("safwk_fuzz_test_config") {
23  include_dirs = [
24    "${safwk_dir}/services/safwk/include",
25    "${safwk_dir}/test/services/safwk/unittest/include",
26  ]
27}
28
29##############################fuzztest##########################################
30ohos_fuzztest("SystemAbilityFwkFuzzTest") {
31  module_out_path = module_output_path
32
33  fuzz_config_file = "${safwk_dir}/test/fuzztest/systemabilityfwk_fuzzer"
34
35  configs = [ ":safwk_fuzz_test_config" ]
36
37  sources = [
38    "${safwk_dir}/test/services/safwk/unittest/sa_mock_permission.cpp",
39    "${safwk_services_dir}/local_ability_manager.cpp",
40    "${safwk_services_dir}/local_ability_manager_stub.cpp",
41    "${safwk_services_dir}/system_ability.cpp",
42    "${safwk_services_dir}/system_ability_ondemand_reason.cpp",
43    "systemabilityfwk_fuzzer.cpp",
44  ]
45  deps = []
46
47  external_deps = [
48    "access_token:libaccesstoken_sdk",
49    "access_token:libnativetoken",
50    "access_token:libtoken_setproc",
51    "c_utils:utils",
52    "hilog:libhilog",
53    "hitrace:hitrace_meter",
54    "ipc:ipc_core",
55    "samgr:samgr_common",
56    "samgr:samgr_proxy",
57  ]
58  defines = []
59}
60
61group("fuzztest") {
62  testonly = true
63  deps = []
64
65  deps += [
66    # deps file
67    ":SystemAbilityFwkFuzzTest",
68  ]
69}
70