# Copyright (c) 2022 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. import("//base/update/updater/updater_default_cfg.gni") import("//build/ohos.gni") group("fuzztest") { testonly = true deps = [ "test/fuzztest/UpdaterFormatPartition_fuzzer:UpdaterFormatPartitionFuzzTest", "test/fuzztest/UpdaterMountForPath_fuzzer:UpdaterMountForPathFuzzTest", "test/fuzztest/UpdaterStartUpdaterProc_fuzzer:UpdaterStartUpdaterProcFuzzTest", "test/fuzztest/applypatch_fuzzer:ApplyPatchFuzzTest", "test/fuzztest/binflow_fuzzer:BinFlowFuzzTest", "test/fuzztest/dopartitions_fuzzer:DoPartitionsFuzzTest", "test/fuzztest/extractandexecutescript_fuzzer:ExtractAndExecuteScriptFuzzTest", "test/fuzztest/getupdatepackageinfo_fuzzer:GetUpdatePackageInfoFuzzTest", "test/fuzztest/package_fuzzer:PackageFuzzTest", "test/fuzztest/readfstabfromfile_fuzzer:ReadFstabFromFileFuzzTest", "test/fuzztest/rebootandinstallupgradepackage_fuzzer:RebootAndInstallUpgradePackageFuzzTest", "test/fuzztest/scriptmanager_fuzzer:ScriptManagerFuzzTest", "test/fuzztest/updaterfactoryreset_fuzzer:UpdaterFactoryResetFuzzTest", "test/fuzztest/updatermain_fuzzer:UpdaterMainFuzzTest", "test/fuzztest/updaterutils_fuzzer:UpdaterUtilsFuzzTest", "test/fuzztest/writeupdatermsg_fuzzer:WriteUpdaterMsgFuzzTest", ] } group("unittest") { testonly = true if (!use_libfuzzer) { deps = [ "test/unittest:updater_unittest", "test/unittest/applypatch_test:applypatch_unittest", "test/unittest/common/ring_buffer:ring_buffer_test", "test/unittest/factory_reset_test:factory_reset_unittest", "test/unittest/flashd_test:flashd_unittest", "test/unittest/flashd_test:flashd_utils_unittest", "test/unittest/flow_update/update_bin:bin_flow_update_test", "test/unittest/package:package_unittest", "test/unittest/script:script_unittest", "test/unittest/updater_binary:binary_unittest", "test/unittest/utils:utils_test", ] if (updater_cfg_file == "") { deps += [ "test/unittest/script:user_instruction", "test/unittest/script:user_instruction_invalid", ] } if (updater_ui_support) { deps += [ "test/unittest/service_test:updater_service_unittest", "test/unittest/updater_ui_test:ui_unittest", ] } } } group("benchmarktest") { testonly = true deps = [ "test/benchmarktest:updater_benchmark_test" ] }