13fc297bdSopenharmony_ci# Copyright (c) 2022-2023 Huawei Device Co., Ltd. 23fc297bdSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 33fc297bdSopenharmony_ci# you may not use this file except in compliance with the License. 43fc297bdSopenharmony_ci# You may obtain a copy of the License at 53fc297bdSopenharmony_ci# 63fc297bdSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 73fc297bdSopenharmony_ci# 83fc297bdSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 93fc297bdSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 103fc297bdSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 113fc297bdSopenharmony_ci# See the License for the specific language governing permissions and 123fc297bdSopenharmony_ci# limitations under the License. 133fc297bdSopenharmony_ci 143fc297bdSopenharmony_ci#####################hydra-fuzz################### 153fc297bdSopenharmony_ciimport("//build/config/features.gni") 163fc297bdSopenharmony_ciimport("//build/test.gni") 173fc297bdSopenharmony_ciimport("../../../soc_perf.gni") 183fc297bdSopenharmony_ci 193fc297bdSopenharmony_ci##############################fuzztest########################################## 203fc297bdSopenharmony_ciconfig("module_private_config") { 213fc297bdSopenharmony_ci include_dirs = [ 223fc297bdSopenharmony_ci "${socperf_common}/include", 233fc297bdSopenharmony_ci "${socperf_interfaces}/inner_api/socperf_client/include", 243fc297bdSopenharmony_ci "${socperf_services}/core/include", 253fc297bdSopenharmony_ci "${socperf_services}/server/include", 263fc297bdSopenharmony_ci ] 273fc297bdSopenharmony_ci} 283fc297bdSopenharmony_ci 293fc297bdSopenharmony_ciohos_fuzztest("LoadConfigXmlFileFuzzTest") { 303fc297bdSopenharmony_ci module_out_path = "soc_perf/soc_perf" 313fc297bdSopenharmony_ci fuzz_config_file = "${socperf_test}/fuzztest/loadconfigxmlfile_fuzzer" 323fc297bdSopenharmony_ci configs = [ ":module_private_config" ] 333fc297bdSopenharmony_ci 343fc297bdSopenharmony_ci cflags = [ 353fc297bdSopenharmony_ci "-g", 363fc297bdSopenharmony_ci "-O0", 373fc297bdSopenharmony_ci "-Wno-unused-variable", 383fc297bdSopenharmony_ci "-fno-omit-frame-pointer", 393fc297bdSopenharmony_ci ] 403fc297bdSopenharmony_ci 413fc297bdSopenharmony_ci sources = [ "loadconfigxmlfile_fuzzer.cpp" ] 423fc297bdSopenharmony_ci 433fc297bdSopenharmony_ci deps = [ "${socperf_services}:socperf_server_static" ] 443fc297bdSopenharmony_ci 453fc297bdSopenharmony_ci external_deps = [ 463fc297bdSopenharmony_ci "c_utils:utils", 473fc297bdSopenharmony_ci "ffrt:libffrt", 483fc297bdSopenharmony_ci "hilog:libhilog", 493fc297bdSopenharmony_ci ] 503fc297bdSopenharmony_ci} 513fc297bdSopenharmony_ci 523fc297bdSopenharmony_ci############################################################################### 533fc297bdSopenharmony_cigroup("fuzztest") { 543fc297bdSopenharmony_ci testonly = true 553fc297bdSopenharmony_ci deps = [ 563fc297bdSopenharmony_ci # deps file 573fc297bdSopenharmony_ci ":LoadConfigXmlFileFuzzTest", 583fc297bdSopenharmony_ci ] 593fc297bdSopenharmony_ci} 603fc297bdSopenharmony_ci############################################################################### 61