1dfe32fa1Soh_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
2dfe32fa1Soh_ci# Licensed under the Apache License, Version 2.0 (the "License");
3dfe32fa1Soh_ci# you may not use this file except in compliance with the License.
4dfe32fa1Soh_ci# You may obtain a copy of the License at
5dfe32fa1Soh_ci#
6dfe32fa1Soh_ci#     http://www.apache.org/licenses/LICENSE-2.0
7dfe32fa1Soh_ci#
8dfe32fa1Soh_ci# Unless required by applicable law or agreed to in writing, software
9dfe32fa1Soh_ci# distributed under the License is distributed on an "AS IS" BASIS,
10dfe32fa1Soh_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11dfe32fa1Soh_ci# See the License for the specific language governing permissions and
12dfe32fa1Soh_ci# limitations under the License.
13dfe32fa1Soh_ci
14dfe32fa1Soh_ciimport("//build/ohos.gni")
15dfe32fa1Soh_ciimport("//build/test.gni")
16dfe32fa1Soh_ci
17dfe32fa1Soh_cimodule_output_path = "asset/asset_UT_test"
18dfe32fa1Soh_ci
19dfe32fa1Soh_ciohos_rust_static_library("asset_db_operator") {
20dfe32fa1Soh_ci  sources = [ "src/lib.rs" ]
21dfe32fa1Soh_ci  deps = [
22dfe32fa1Soh_ci    ":asset_sqlite3_wrapper",
23dfe32fa1Soh_ci    "../../frameworks/definition:asset_definition",
24dfe32fa1Soh_ci    "../../frameworks/os_dependency/file:asset_file_operator",
25dfe32fa1Soh_ci    "../../frameworks/os_dependency/log:asset_log",
26dfe32fa1Soh_ci    "../common:asset_common",
27dfe32fa1Soh_ci    "../crypto_manager:asset_crypto_manager",
28dfe32fa1Soh_ci    "../db_key_operator:asset_db_key_operator",
29dfe32fa1Soh_ci    "//third_party/rust/crates/lazy-static.rs:lib",
30dfe32fa1Soh_ci  ]
31dfe32fa1Soh_ci
32dfe32fa1Soh_ci  crate_name = "asset_db_operator"
33dfe32fa1Soh_ci  crate_type = "rlib"
34dfe32fa1Soh_ci  subsystem_name = "security"
35dfe32fa1Soh_ci  part_name = "asset"
36dfe32fa1Soh_ci}
37dfe32fa1Soh_ci
38dfe32fa1Soh_ciohos_rust_unittest("asset_db_operator_test") {
39dfe32fa1Soh_ci  module_out_path = module_output_path
40dfe32fa1Soh_ci  sources = [ "src/lib.rs" ]
41dfe32fa1Soh_ci  deps = [
42dfe32fa1Soh_ci    ":asset_sqlite3_wrapper",
43dfe32fa1Soh_ci    "../../frameworks/definition:asset_definition",
44dfe32fa1Soh_ci    "../../frameworks/os_dependency/file:asset_file_operator",
45dfe32fa1Soh_ci    "../../frameworks/os_dependency/log:asset_log",
46dfe32fa1Soh_ci    "../common:asset_common",
47dfe32fa1Soh_ci    "../crypto_manager:asset_crypto_manager",
48dfe32fa1Soh_ci    "../db_key_operator:asset_db_key_operator",
49dfe32fa1Soh_ci    "//third_party/rust/crates/lazy-static.rs:lib",
50dfe32fa1Soh_ci  ]
51dfe32fa1Soh_ci
52dfe32fa1Soh_ci  external_deps = [ "hilog:libhilog" ]
53dfe32fa1Soh_ci  subsystem_name = "security"
54dfe32fa1Soh_ci  part_name = "asset"
55dfe32fa1Soh_ci}
56dfe32fa1Soh_ci
57dfe32fa1Soh_ciohos_static_library("asset_sqlite3_wrapper") {
58dfe32fa1Soh_ci  sources = [ "src/sqlite3_wrapper.c" ]
59dfe32fa1Soh_ci  external_deps = [ "sqlite:sqlite" ]
60dfe32fa1Soh_ci  subsystem_name = "security"
61dfe32fa1Soh_ci  part_name = "asset"
62dfe32fa1Soh_ci}
63