1# Copyright (c) 2020-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("//build/lite/config/component/lite_component.gni") 15import("//build/lite/config/test.gni") 16 17config("app_verify_test_config") { 18 cflags_cc = [ "-std=c++17" ] 19} 20 21unittest("app_verify_test") { 22 output_extension = "bin" 23 output_dir = "$root_out_dir/test/unittest/security" 24 sources = [ 25 "packets/business_packet.cpp", 26 "packets/modified_packet.cpp", 27 "packets/success_test.cpp", 28 "packets/udid_wrong_test.cpp", 29 "packets/unsigned_packet.cpp", 30 "packets/wrong_license.cpp", 31 "src/hap_verify_test.cpp", 32 "src/write_file.cpp", 33 ] 34 35 configs = [ ":app_verify_test_config" ] 36 37 include_dirs = [ 38 "src", 39 "//base/security/appverify/interfaces/innerkits/appverify_lite/include", 40 "//third_party/bounds_checking_function/include", 41 "//third_party/cJSON", 42 ] 43 44 deps = [ 45 "//base/security/appverify/interfaces/innerkits/appverify_lite:verify", 46 "//build/lite/config/component/cJSON:cjson_shared", 47 "//third_party/bounds_checking_function:libsec_shared", 48 "//third_party/mbedtls:mbedtls_shared", 49 ] 50 ldflags = [ 51 "-lstdc++", 52 "-lm", 53 "-lpthread", 54 ] 55} 56 57group("unittest") { 58 deps = [ ":app_verify_test" ] 59} 60