10fed37d5Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd. 20fed37d5Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 30fed37d5Sopenharmony_ci# you may not use this file except in compliance with the License. 40fed37d5Sopenharmony_ci# You may obtain a copy of the License at 50fed37d5Sopenharmony_ci# 60fed37d5Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 70fed37d5Sopenharmony_ci# 80fed37d5Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 90fed37d5Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 100fed37d5Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 110fed37d5Sopenharmony_ci# See the License for the specific language governing permissions and 120fed37d5Sopenharmony_ci# limitations under the License. 130fed37d5Sopenharmony_ci 140fed37d5Sopenharmony_ci#####################hydra-fuzz################### 150fed37d5Sopenharmony_ciimport("//build/config/features.gni") 160fed37d5Sopenharmony_ciimport("//build/ohos.gni") 170fed37d5Sopenharmony_ciimport("//build/test.gni") 180fed37d5Sopenharmony_cimodule_output_path = "safwk/safwk" 190fed37d5Sopenharmony_cisafwk_dir = "../../.." 200fed37d5Sopenharmony_cisafwk_services_dir = "${safwk_dir}/services/safwk/src" 210fed37d5Sopenharmony_ci 220fed37d5Sopenharmony_ciconfig("safwk_fuzz_test_config") { 230fed37d5Sopenharmony_ci include_dirs = [ 240fed37d5Sopenharmony_ci "${safwk_dir}/services/safwk/include", 250fed37d5Sopenharmony_ci "${safwk_dir}/test/services/safwk/unittest/include", 260fed37d5Sopenharmony_ci ] 270fed37d5Sopenharmony_ci} 280fed37d5Sopenharmony_ci 290fed37d5Sopenharmony_ci##############################fuzztest########################################## 300fed37d5Sopenharmony_ciohos_fuzztest("SystemAbilityFwkFuzzTest") { 310fed37d5Sopenharmony_ci module_out_path = module_output_path 320fed37d5Sopenharmony_ci 330fed37d5Sopenharmony_ci fuzz_config_file = "${safwk_dir}/test/fuzztest/systemabilityfwk_fuzzer" 340fed37d5Sopenharmony_ci 350fed37d5Sopenharmony_ci configs = [ ":safwk_fuzz_test_config" ] 360fed37d5Sopenharmony_ci 370fed37d5Sopenharmony_ci sources = [ 380fed37d5Sopenharmony_ci "${safwk_dir}/test/services/safwk/unittest/mock_accesstoken_kit.cpp", 390fed37d5Sopenharmony_ci "${safwk_dir}/test/services/safwk/unittest/mock_sa_realize.cpp", 400fed37d5Sopenharmony_ci "${safwk_dir}/test/services/safwk/unittest/sa_mock_permission.cpp", 410fed37d5Sopenharmony_ci "${safwk_services_dir}/local_ability_manager.cpp", 420fed37d5Sopenharmony_ci "${safwk_services_dir}/local_ability_manager_dumper.cpp", 430fed37d5Sopenharmony_ci "${safwk_services_dir}/local_ability_manager_stub.cpp", 440fed37d5Sopenharmony_ci "${safwk_services_dir}/system_ability.cpp", 450fed37d5Sopenharmony_ci "${safwk_services_dir}/system_ability_ondemand_reason.cpp", 460fed37d5Sopenharmony_ci "systemabilityfwk_fuzzer.cpp", 470fed37d5Sopenharmony_ci ] 480fed37d5Sopenharmony_ci deps = [] 490fed37d5Sopenharmony_ci 500fed37d5Sopenharmony_ci external_deps = [ 510fed37d5Sopenharmony_ci "access_token:libaccesstoken_sdk", 520fed37d5Sopenharmony_ci "access_token:libnativetoken_shared", 530fed37d5Sopenharmony_ci "access_token:libtokensetproc_shared", 540fed37d5Sopenharmony_ci "c_utils:utils", 550fed37d5Sopenharmony_ci "hilog:libhilog", 560fed37d5Sopenharmony_ci "hitrace:hitrace_meter", 570fed37d5Sopenharmony_ci "ipc:ipc_core", 580fed37d5Sopenharmony_ci "samgr:samgr_common", 590fed37d5Sopenharmony_ci "samgr:samgr_proxy", 600fed37d5Sopenharmony_ci ] 610fed37d5Sopenharmony_ci defines = [] 620fed37d5Sopenharmony_ci} 630fed37d5Sopenharmony_ci 640fed37d5Sopenharmony_cigroup("fuzztest") { 650fed37d5Sopenharmony_ci testonly = true 660fed37d5Sopenharmony_ci deps = [] 670fed37d5Sopenharmony_ci 680fed37d5Sopenharmony_ci deps += [ 690fed37d5Sopenharmony_ci # deps file 700fed37d5Sopenharmony_ci ":SystemAbilityFwkFuzzTest", 710fed37d5Sopenharmony_ci ] 720fed37d5Sopenharmony_ci} 73