106694b06Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd.
206694b06Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
306694b06Sopenharmony_ci# you may not use this file except in compliance with the License.
406694b06Sopenharmony_ci# You may obtain a copy of the License at
506694b06Sopenharmony_ci#
606694b06Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
706694b06Sopenharmony_ci#
806694b06Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
906694b06Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
1006694b06Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1106694b06Sopenharmony_ci# See the License for the specific language governing permissions and
1206694b06Sopenharmony_ci# limitations under the License.
1306694b06Sopenharmony_ciimport("//build/test.gni")
1406694b06Sopenharmony_ciimport("//foundation/distributeddatamgr/relational_store/relational_store.gni")
1506694b06Sopenharmony_ci
1606694b06Sopenharmony_cimodule_output_path = "relational_store/native_rdb_ndk"
1706694b06Sopenharmony_ci
1806694b06Sopenharmony_ci###############################################################################
1906694b06Sopenharmony_ciconfig("module_private_config") {
2006694b06Sopenharmony_ci  visibility = [ ":*" ]
2106694b06Sopenharmony_ci
2206694b06Sopenharmony_ci  include_dirs = [
2306694b06Sopenharmony_ci    "${kvstore_path}/common",
2406694b06Sopenharmony_ci    "${relational_store_base_path}/interfaces/ndk/include",
2506694b06Sopenharmony_ci    "${relational_store_innerapi_path}/rdb/include",
2606694b06Sopenharmony_ci    "${relational_store_innerapi_path}/appdatafwk/include",
2706694b06Sopenharmony_ci    "${relational_store_base_path}/interfaces/ndk/src",
2806694b06Sopenharmony_ci    "${relational_store_common_path}/include",
2906694b06Sopenharmony_ci    "${relational_store_native_path}/rdb/include",
3006694b06Sopenharmony_ci  ]
3106694b06Sopenharmony_ci}
3206694b06Sopenharmony_ci
3306694b06Sopenharmony_ciohos_unittest("NativeRdbNdkTest") {
3406694b06Sopenharmony_ci  module_out_path = module_output_path
3506694b06Sopenharmony_ci
3606694b06Sopenharmony_ci  sources = [
3706694b06Sopenharmony_ci    "${relational_store_base_path}/interfaces/ndk/src/convertor_error_code.cpp",
3806694b06Sopenharmony_ci    "${relational_store_base_path}/interfaces/ndk/src/modify_time_cursor.cpp",
3906694b06Sopenharmony_ci    "${relational_store_base_path}/interfaces/ndk/src/relational_asset.cpp",
4006694b06Sopenharmony_ci    "${relational_store_base_path}/interfaces/ndk/src/relational_cursor.cpp",
4106694b06Sopenharmony_ci    "${relational_store_base_path}/interfaces/ndk/src/relational_predicates.cpp",
4206694b06Sopenharmony_ci    "${relational_store_base_path}/interfaces/ndk/src/relational_predicates_objects.cpp",
4306694b06Sopenharmony_ci    "${relational_store_base_path}/interfaces/ndk/src/relational_store.cpp",
4406694b06Sopenharmony_ci    "${relational_store_base_path}/interfaces/ndk/src/relational_values_bucket.cpp",
4506694b06Sopenharmony_ci    "unittest/rdb_asset_test.cpp",
4606694b06Sopenharmony_ci    "unittest/rdb_cursor_test.cpp",
4706694b06Sopenharmony_ci    "unittest/rdb_predicates_test.cpp",
4806694b06Sopenharmony_ci    "unittest/rdb_store_configv2_test.cpp",
4906694b06Sopenharmony_ci    "unittest/rdb_store_test.cpp",
5006694b06Sopenharmony_ci  ]
5106694b06Sopenharmony_ci
5206694b06Sopenharmony_ci  configs = [ ":module_private_config" ]
5306694b06Sopenharmony_ci
5406694b06Sopenharmony_ci  external_deps = [
5506694b06Sopenharmony_ci    "access_token:libaccesstoken_sdk",
5606694b06Sopenharmony_ci    "access_token:libtoken_setproc",
5706694b06Sopenharmony_ci    "c_utils:utils",
5806694b06Sopenharmony_ci    "hilog:libhilog",
5906694b06Sopenharmony_ci  ]
6006694b06Sopenharmony_ci
6106694b06Sopenharmony_ci  deps = [
6206694b06Sopenharmony_ci    "${relational_store_innerapi_path}/rdb:native_rdb",
6306694b06Sopenharmony_ci    "//third_party/googletest:gtest_main",
6406694b06Sopenharmony_ci  ]
6506694b06Sopenharmony_ci}
6606694b06Sopenharmony_ci
6706694b06Sopenharmony_ci###############################################################################
6806694b06Sopenharmony_cigroup("unittest") {
6906694b06Sopenharmony_ci  testonly = true
7006694b06Sopenharmony_ci
7106694b06Sopenharmony_ci  deps = [ ":NativeRdbNdkTest" ]
7206694b06Sopenharmony_ci}
73