# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #####################hydra-fuzz################### import("//build/config/features.gni") import("//build/ohos.gni") import("//build/test.gni") module_output_path = "safwk/safwk" safwk_dir = "../../.." safwk_services_dir = "${safwk_dir}/services/safwk/src" config("safwk_fuzz_test_config") { include_dirs = [ "${safwk_dir}/services/safwk/include", "${safwk_dir}/test/services/safwk/unittest/include", ] } ##############################fuzztest########################################## ohos_fuzztest("SystemAbilityFwkFuzzTest") { module_out_path = module_output_path fuzz_config_file = "${safwk_dir}/test/fuzztest/systemabilityfwk_fuzzer" configs = [ ":safwk_fuzz_test_config" ] sources = [ "${safwk_dir}/test/services/safwk/unittest/mock_accesstoken_kit.cpp", "${safwk_dir}/test/services/safwk/unittest/mock_sa_realize.cpp", "${safwk_dir}/test/services/safwk/unittest/sa_mock_permission.cpp", "${safwk_services_dir}/local_ability_manager.cpp", "${safwk_services_dir}/local_ability_manager_dumper.cpp", "${safwk_services_dir}/local_ability_manager_stub.cpp", "${safwk_services_dir}/system_ability.cpp", "${safwk_services_dir}/system_ability_ondemand_reason.cpp", "systemabilityfwk_fuzzer.cpp", ] deps = [] external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libnativetoken_shared", "access_token:libtokensetproc_shared", "c_utils:utils", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", "samgr:samgr_common", "samgr:samgr_proxy", ] defines = [] } group("fuzztest") { testonly = true deps = [] deps += [ # deps file ":SystemAbilityFwkFuzzTest", ] }