• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//base/update/updater/updater_default_cfg.gni")
15import("//build/ohos.gni")
16
17group("fuzztest") {
18  testonly = true
19  deps = [
20    "test/fuzztest/UpdaterFormatPartition_fuzzer:UpdaterFormatPartitionFuzzTest",
21    "test/fuzztest/UpdaterMountForPath_fuzzer:UpdaterMountForPathFuzzTest",
22    "test/fuzztest/UpdaterStartUpdaterProc_fuzzer:UpdaterStartUpdaterProcFuzzTest",
23    "test/fuzztest/applypatch_fuzzer:ApplyPatchFuzzTest",
24    "test/fuzztest/binflow_fuzzer:BinFlowFuzzTest",
25    "test/fuzztest/dopartitions_fuzzer:DoPartitionsFuzzTest",
26    "test/fuzztest/extractandexecutescript_fuzzer:ExtractAndExecuteScriptFuzzTest",
27    "test/fuzztest/getupdatepackageinfo_fuzzer:GetUpdatePackageInfoFuzzTest",
28    "test/fuzztest/package_fuzzer:PackageFuzzTest",
29    "test/fuzztest/readfstabfromfile_fuzzer:ReadFstabFromFileFuzzTest",
30    "test/fuzztest/rebootandinstallupgradepackage_fuzzer:RebootAndInstallUpgradePackageFuzzTest",
31    "test/fuzztest/scriptmanager_fuzzer:ScriptManagerFuzzTest",
32    "test/fuzztest/updaterfactoryreset_fuzzer:UpdaterFactoryResetFuzzTest",
33    "test/fuzztest/updatermain_fuzzer:UpdaterMainFuzzTest",
34    "test/fuzztest/updaterutils_fuzzer:UpdaterUtilsFuzzTest",
35    "test/fuzztest/writeupdatermsg_fuzzer:WriteUpdaterMsgFuzzTest",
36  ]
37}
38
39group("unittest") {
40  testonly = true
41  if (!use_libfuzzer) {
42    deps = [
43      "test/unittest:updater_unittest",
44      "test/unittest/applypatch_test:applypatch_unittest",
45      "test/unittest/common/ring_buffer:ring_buffer_test",
46      "test/unittest/factory_reset_test:factory_reset_unittest",
47      "test/unittest/flow_update/update_bin:bin_flow_update_test",
48      "test/unittest/package:package_unittest",
49      "test/unittest/script:script_unittest",
50      "test/unittest/stream_update:bin_chunk_update_test",
51      "test/unittest/updater_binary:binary_unittest",
52      "test/unittest/utils:utils_test",
53    ]
54    if (!ohos_indep_compiler_enable) {
55      deps += [
56        "test/unittest/flashd_test:flashd_unittest",
57        "test/unittest/flashd_test:flashd_utils_unittest",
58      ]
59    }
60    if (updater_cfg_file == "") {
61      deps += [
62        "test/unittest/script:user_instruction",
63        "test/unittest/script:user_instruction_invalid",
64      ]
65    }
66    if (updater_ui_support) {
67      deps += [
68        "test/unittest/service_test:updater_service_unittest",
69        "test/unittest/updater_ui_test:ui_unittest",
70      ]
71    }
72  }
73}
74
75group("benchmarktest") {
76  testonly = true
77  deps = [ "test/benchmarktest:updater_benchmark_test" ]
78}
79