1190978c3Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 2190978c3Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3190978c3Sopenharmony_ci# you may not use this file except in compliance with the License. 4190978c3Sopenharmony_ci# You may obtain a copy of the License at 5190978c3Sopenharmony_ci# 6190978c3Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7190978c3Sopenharmony_ci# 8190978c3Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9190978c3Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10190978c3Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11190978c3Sopenharmony_ci# See the License for the specific language governing permissions and 12190978c3Sopenharmony_ci# limitations under the License. 13190978c3Sopenharmony_ci 14190978c3Sopenharmony_ciimport("../../../updateengine.gni") 15190978c3Sopenharmony_ci 16190978c3Sopenharmony_ci#####################hydra-fuzz################### 17190978c3Sopenharmony_ciimport("//build/config/features.gni") 18190978c3Sopenharmony_ciimport("//build/test.gni") 19190978c3Sopenharmony_cimodule_output_path = "$updateengine_part_name/$updateengine_test_name" 20190978c3Sopenharmony_ci 21190978c3Sopenharmony_ci##############################fuzztest########################################## 22190978c3Sopenharmony_ciohos_fuzztest("UpdateServiceCancelFuzzTest") { 23190978c3Sopenharmony_ci module_out_path = module_output_path 24190978c3Sopenharmony_ci fuzz_config_file = 25190978c3Sopenharmony_ci "$updateengine_root_path/test/fuzztest/updateservicecancel_fuzzer" 26190978c3Sopenharmony_ci include_dirs = [ 27190978c3Sopenharmony_ci "$updateengine_root_path/interfaces/inner_api/common/include", 28190978c3Sopenharmony_ci "$updateengine_root_path/services/callback/include", 29190978c3Sopenharmony_ci "$updateengine_root_path/services/engine/include", 30190978c3Sopenharmony_ci "$updateengine_root_path/test/fuzztest/common", 31190978c3Sopenharmony_ci "//third_party/bounds_checking_function/include", # secure method 32190978c3Sopenharmony_ci ] 33190978c3Sopenharmony_ci cflags = [ 34190978c3Sopenharmony_ci "-g", 35190978c3Sopenharmony_ci "-O0", 36190978c3Sopenharmony_ci "-Wno-unused-variable", 37190978c3Sopenharmony_ci "-fno-omit-frame-pointer", 38190978c3Sopenharmony_ci ] 39190978c3Sopenharmony_ci sources = [ 40190978c3Sopenharmony_ci "$updateengine_root_path/test/fuzztest/common/fuzztest_helper.cpp", 41190978c3Sopenharmony_ci "$updateengine_root_path/test/fuzztest/updateservicecancel_fuzzer/updateservicecancel_fuzzer.cpp", 42190978c3Sopenharmony_ci ] 43190978c3Sopenharmony_ci deps = [ "$updateengine_root_path/interfaces/inner_api/engine:$updateengine_inner_library_name" ] 44190978c3Sopenharmony_ci external_deps = [ 45190978c3Sopenharmony_ci "ability_runtime:extension_manager", 46190978c3Sopenharmony_ci "access_token:libaccesstoken_sdk", 47190978c3Sopenharmony_ci "access_token:libnativetoken", 48190978c3Sopenharmony_ci "access_token:libtoken_setproc", 49190978c3Sopenharmony_ci "c_utils:utils", # sptr 50190978c3Sopenharmony_ci "hilog:libhilog", 51190978c3Sopenharmony_ci "ipc:ipc_core", 52190978c3Sopenharmony_ci "samgr:samgr_proxy", 53190978c3Sopenharmony_ci ] 54190978c3Sopenharmony_ci} 55190978c3Sopenharmony_ci 56190978c3Sopenharmony_ci############################################################################### 57190978c3Sopenharmony_cigroup("fuzztest") { 58190978c3Sopenharmony_ci testonly = true 59190978c3Sopenharmony_ci deps = [] 60190978c3Sopenharmony_ci deps += [ 61190978c3Sopenharmony_ci # deps file 62190978c3Sopenharmony_ci ":UpdateServiceCancelFuzzTest", 63190978c3Sopenharmony_ci ] 64190978c3Sopenharmony_ci} 65190978c3Sopenharmony_ci############################################################################### 66