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 "//third_party/googletest:gmock_main", 55 "//third_party/googletest:gtest_main", 56 "//third_party/zlib:libz", 57 ] 58 59 external_deps = [ 60 "c_utils:utils", 61 "eventhandler:libeventhandler", 62 "hilog:libhilog", 63 "ipc:ipc_core", 64 "napi:ace_napi", 65 ] 66} 67 68group("unittest") { 69 testonly = true 70 deps = [ ":zip_test" ] 71} 72