• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2024 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("//build/test.gni")
15import("../../../../../appexecfwk.gni")
16
17module_output_path = "bundle_framework/tools"
18
19config("module_private_config") {
20  visibility = [ ":*" ]
21  include_dirs = []
22  cflags = []
23  if (target_cpu == "arm") {
24    cflags += [ "-DBINDER_IPC_32BIT" ]
25  }
26}
27
28ohos_unittest("zip_test") {
29  module_out_path = module_output_path
30
31  sources = [
32    "../napi/zlib_callback_info.cpp",
33    "../src/file_path.cpp",
34    "../src/zip.cpp",
35    "../src/zip_internal.cpp",
36    "../src/zip_reader.cpp",
37    "../src/zip_utils.cpp",
38    "../src/zip_writer.cpp",
39    "unittest/zip_test.cpp",
40  ]
41
42  configs = [
43    "../:zip_config",
44    ":module_private_config",
45  ]
46
47  deps = [
48    "${base_path}:appexecfwk_base",
49    "${bundle_framework_path}/interfaces/kits/js/zip/test/ohos_test:copy_ohos_test",
50    "${bundle_framework_path}/test/sceneProject/unittest/test_bundle/resourceManagerTest:resourceManagerTest",
51    "${common_path}:libappexecfwk_common",
52    "${core_path}:appexecfwk_core",
53    "${kits_path}/js/common:bundle_napi_common",
54  ]
55
56  external_deps = [
57    "c_utils:utils",
58    "eventhandler:libeventhandler",
59    "ffrt:libffrt",
60    "hilog:libhilog",
61    "ipc:ipc_core",
62    "napi:ace_napi",
63  ]
64
65  public_external_deps = [
66    "googletest:gmock_main",
67    "googletest:gtest_main",
68    "zlib:libz",
69  ]
70}
71
72group("unittest") {
73  testonly = true
74  deps = [ ":zip_test" ]
75}
76