154aa6d63Sopenharmony_ci# Copyright (c) 2024-2024 Huawei Device Co., Ltd.
254aa6d63Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
354aa6d63Sopenharmony_ci# you may not use this file except in compliance with the License.
454aa6d63Sopenharmony_ci# You may obtain a copy of the License at
554aa6d63Sopenharmony_ci#
654aa6d63Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0
754aa6d63Sopenharmony_ci#
854aa6d63Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
954aa6d63Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1054aa6d63Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1154aa6d63Sopenharmony_ci# See the License for the specific language governing permissions and
1254aa6d63Sopenharmony_ci# limitations under the License.
1354aa6d63Sopenharmony_ci
1454aa6d63Sopenharmony_ciimport("//build/ohos.gni")
1554aa6d63Sopenharmony_ciimport("//build/test.gni")
1654aa6d63Sopenharmony_ciimport("../../hapsigntool_cpp/signature_tools.gni")
1754aa6d63Sopenharmony_ci
1854aa6d63Sopenharmony_cimodule_out_path = "hapsigner/hapsigner_pc"
1954aa6d63Sopenharmony_ci
2054aa6d63Sopenharmony_ciohos_unittest("hapsigntool_pc_unittest") {
2154aa6d63Sopenharmony_ci  testonly = true
2254aa6d63Sopenharmony_ci  module_out_path = module_out_path
2354aa6d63Sopenharmony_ci  resource_config_file = "ohos_test.xml"
2454aa6d63Sopenharmony_ci
2554aa6d63Sopenharmony_ci  configs = [ "${signature_tools_test}:service_include" ]
2654aa6d63Sopenharmony_ci
2754aa6d63Sopenharmony_ci  sources = [
2854aa6d63Sopenharmony_ci    "./byteBuffer/byte_buffer_test.cpp",
2954aa6d63Sopenharmony_ci    "./codeSigning/datastructure/code_sign_block_header_test.cpp",
3054aa6d63Sopenharmony_ci    "./codeSigning/datastructure/code_sign_block_test.cpp",
3154aa6d63Sopenharmony_ci    "./codeSigning/datastructure/elf_sign_block_test.cpp",
3254aa6d63Sopenharmony_ci    "./codeSigning/datastructure/extension_test.cpp",
3354aa6d63Sopenharmony_ci    "./codeSigning/datastructure/fs_verity_info_segment_test.cpp",
3454aa6d63Sopenharmony_ci    "./codeSigning/datastructure/hap_info_segment_test.cpp",
3554aa6d63Sopenharmony_ci    "./codeSigning/datastructure/merkle_tree_extension_test.cpp",
3654aa6d63Sopenharmony_ci    "./codeSigning/datastructure/native_lib_info_segment_test.cpp",
3754aa6d63Sopenharmony_ci    "./codeSigning/datastructure/segment_header_test.cpp",
3854aa6d63Sopenharmony_ci    "./codeSigning/datastructure/sign_info_test.cpp",
3954aa6d63Sopenharmony_ci    "./codeSigning/datastructure/signed_file_pos_test.cpp",
4054aa6d63Sopenharmony_ci    "./codeSigning/fsverity/fs_verity_descriptor_test.cpp",
4154aa6d63Sopenharmony_ci    "./codeSigning/fsverity/fs_verity_descriptor_with_sign_test.cpp",
4254aa6d63Sopenharmony_ci    "./codeSigning/fsverity/fs_verity_digest_test.cpp",
4354aa6d63Sopenharmony_ci    "./codeSigning/fsverity/fs_verity_generator_test.cpp",
4454aa6d63Sopenharmony_ci    "./codeSigning/fsverity/fs_verity_hash_algorithm_test.cpp",
4554aa6d63Sopenharmony_ci    "./codeSigning/fsverity/merkle_tree_builder_test.cpp",
4654aa6d63Sopenharmony_ci    "./codeSigning/sign/bc_signeddata_generator_test.cpp",
4754aa6d63Sopenharmony_ci    "./codeSigning/sign/code_signing_test.cpp",
4854aa6d63Sopenharmony_ci    "./codeSigning/sign/verify_code_signature_test.cpp",
4954aa6d63Sopenharmony_ci    "./codeSigning/utils/cms_utils_test.cpp",
5054aa6d63Sopenharmony_ci    "./codeSigning/utils/fs_digest_utils_test.cpp",
5154aa6d63Sopenharmony_ci    "./elfVerify/hap_utils_test.cpp",
5254aa6d63Sopenharmony_ci    "./elfVerify/sign_block_info_test.cpp",
5354aa6d63Sopenharmony_ci    "./elfVerify/sign_content_info_test.cpp",
5454aa6d63Sopenharmony_ci    "./elfVerify/signature_block_types_test.cpp",
5554aa6d63Sopenharmony_ci    "./elfVerify/signing_block_test.cpp",
5654aa6d63Sopenharmony_ci    "./elfVerify/verify_bin_test.cpp",
5754aa6d63Sopenharmony_ci    "./elfVerify/verify_elf_test.cpp",
5854aa6d63Sopenharmony_ci    "./generateCA/generate_ca_test.cpp",
5954aa6d63Sopenharmony_ci    "./generateCA/generate_general_ca_test.cpp",
6054aa6d63Sopenharmony_ci    "./generateCA/generate_sub_ca_test.cpp",
6154aa6d63Sopenharmony_ci    "./generateCsr/generate_csr_test.cpp",
6254aa6d63Sopenharmony_ci    "./generateKeyPair/generate_keypair_test.cpp",
6354aa6d63Sopenharmony_ci    "./generateKeyPair/hap_sign_cmd_test.cpp",
6454aa6d63Sopenharmony_ci    "./generateKeyPair/hap_sign_tool_test.cpp",
6554aa6d63Sopenharmony_ci    "./generateKeyPair/options_test.cpp",
6654aa6d63Sopenharmony_ci    "./generateKeyPair/process_cmd_expansion_test.cpp",
6754aa6d63Sopenharmony_ci    "./generateKeyPair/process_cmd_test.cpp",
6854aa6d63Sopenharmony_ci    "./hapSign/block_data_test.cpp",
6954aa6d63Sopenharmony_ci    "./hapSign/block_head_test.cpp",
7054aa6d63Sopenharmony_ci    "./hapSign/hap_openssl_utils_test.cpp",
7154aa6d63Sopenharmony_ci    "./hapSign/hap_sign_test.cpp",
7254aa6d63Sopenharmony_ci    "./hapSign/sign_bin_test.cpp",
7354aa6d63Sopenharmony_ci    "./hapSign/sign_block_data_test.cpp",
7454aa6d63Sopenharmony_ci    "./hapSign/sign_elf_test.cpp",
7554aa6d63Sopenharmony_ci    "./hapSign/sign_head_test.cpp",
7654aa6d63Sopenharmony_ci    "./hapSign/sign_provider_test.cpp",
7754aa6d63Sopenharmony_ci    "./hapVerify/hap_cert_verify_openssl_utils_test.cpp",
7854aa6d63Sopenharmony_ci    "./hapVerify/hap_signer_block_utils_test.cpp",
7954aa6d63Sopenharmony_ci    "./hapVerify/hap_verify_test.cpp",
8054aa6d63Sopenharmony_ci    "./hapVerify/provision_verify_test.cpp",
8154aa6d63Sopenharmony_ci    "./hapVerify/random_access_file_test.cpp",
8254aa6d63Sopenharmony_ci    "./signProfile/pkcs7_data_test.cpp",
8354aa6d63Sopenharmony_ci    "./signProfile/profile_test.cpp",
8454aa6d63Sopenharmony_ci    "./signProfile/provision_test.cpp",
8554aa6d63Sopenharmony_ci    "./signProfile/sign_profile_test.cpp",
8654aa6d63Sopenharmony_ci    "./utils/byte_array_utils_test.cpp",
8754aa6d63Sopenharmony_ci    "./utils/cert_tools_test.cpp",
8854aa6d63Sopenharmony_ci    "./utils/file_utils_test.cpp",
8954aa6d63Sopenharmony_ci    "./zip/random_access_file_input_output_test.cpp",
9054aa6d63Sopenharmony_ci    "./zip/zip_signer_test.cpp",
9154aa6d63Sopenharmony_ci  ]
9254aa6d63Sopenharmony_ci
9354aa6d63Sopenharmony_ci  remove_configs = [ "//build/config/compiler:no_exceptions" ]
9454aa6d63Sopenharmony_ci
9554aa6d63Sopenharmony_ci  deps = [ "${signature_tools_test}:service_target" ]
9654aa6d63Sopenharmony_ci
9754aa6d63Sopenharmony_ci  install_images = [ "system" ]
9854aa6d63Sopenharmony_ci  install_enable = true
9954aa6d63Sopenharmony_ci  part_name = "hapsigner"
10054aa6d63Sopenharmony_ci  subsystem_name = "developtools"
10154aa6d63Sopenharmony_ci}
102