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/mock_accesstoken_kit.cpp", 39 "${safwk_dir}/test/services/safwk/unittest/mock_sa_realize.cpp", 40 "${safwk_dir}/test/services/safwk/unittest/sa_mock_permission.cpp", 41 "${safwk_services_dir}/local_ability_manager.cpp", 42 "${safwk_services_dir}/local_ability_manager_dumper.cpp", 43 "${safwk_services_dir}/local_ability_manager_stub.cpp", 44 "${safwk_services_dir}/system_ability.cpp", 45 "${safwk_services_dir}/system_ability_ondemand_reason.cpp", 46 "systemabilityfwk_fuzzer.cpp", 47 ] 48 deps = [] 49 50 external_deps = [ 51 "access_token:libaccesstoken_sdk", 52 "access_token:libnativetoken_shared", 53 "access_token:libtokensetproc_shared", 54 "c_utils:utils", 55 "hilog:libhilog", 56 "hitrace:hitrace_meter", 57 "ipc:ipc_core", 58 "samgr:samgr_common", 59 "samgr:samgr_proxy", 60 ] 61 defines = [] 62} 63 64group("fuzztest") { 65 testonly = true 66 deps = [] 67 68 deps += [ 69 # deps file 70 ":SystemAbilityFwkFuzzTest", 71 ] 72} 73