• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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.
13import("//build/test.gni")
14
15module_output_path = "kv_store/distributeddb"
16
17mul_sources = [
18  "common/distributeddb/src/auto_launch_callback.cpp",
19  "common/distributeddb/src/delegate_callback.cpp",
20  "common/distributeddb/src/delegate_kv_mgr_callback.cpp",
21  "common/distributeddb/src/distributed_test_tools.cpp",
22  "common/distributeddb/src/kv_store_observer_impl.cpp",
23  "common/distributeddb/src/kv_store_snapshot_callback.cpp",
24]
25
26###############################################################################
27config("module_private_config") {
28  visibility = [ ":*" ]
29
30  include_dirs = [
31    "../../../common/include/cloud",
32    "../../../interfaces/include/cloud",
33    "../../../storage/src/cloud",
34    "../../../storage/src/kv",
35    "../../../storage/src/gaussdb_rd",
36    "../../../storage/src/relational",
37    "../../../syncer/src/cloud",
38    "../../../syncer/src/device",
39    "../../../storage/src/sqlite/kv",
40    "../../../syncer/src/device/multiver",
41    "../../../syncer/src/device/singlever",
42    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/include",
43    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/include",
44    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src",
45    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/multiver",
46    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/storage/src/sqlite",
47    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/common/include",
48    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/include",
49    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb/interfaces/src",
50
51    # "../adapter/include/communicator",
52    "//developtools/liblog",
53    "common/distributeddb/include",
54    "include",
55    "//commonlibrary/c_utils/base/include",
56    "//third_party/sqlite/include",
57    "//foundation/distributeddatamgr/kv_store/interfaces/innerkits/distributeddata/include",
58    "//third_party/openssl/include/",
59  ]
60
61  defines = [
62    "_LARGEFILE64_SOURCE",
63    "_FILE_OFFSET_BITS=64",
64    "SQLITE_HAS_CODEC",
65    "USE_SQLITE_SYMBOLS",
66    "USING_HILOG_LOGGER",
67    "TESTCASES_USING_GTEST_EXT",
68    "OMIT_JSON",
69    "LOW_LEVEL_MEM_DEV",
70    "RELEASE_MODE_V2",
71    "RELEASE_MODE_V3",
72    "OMIT_MULTI_VER",
73    "OPENSSL_SUPPRESS_DEPRECATED",
74  ]
75  ldflags = [ "-Wl,--exclude-libs,ALL" ]
76}
77
78##############################moduletest##########################################
79ohos_moduletest("DistributeddbKvTransactionTest") {
80  module_out_path = module_output_path
81
82  sources = [
83    "common/distributeddb/src/distributed_test_sysinfo.cpp",
84    "common/distributeddb/src/distributeddb_data_generator.cpp",
85    "src/distributed_crud_transaction_tools.cpp",
86    "src/distributeddb_kv_transaction_test.cpp",
87  ]
88  sources += mul_sources
89  configs = [ ":module_private_config" ]
90
91  deps = [
92    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
93    "//third_party/googletest:gtest_main",
94    "//third_party/openssl:libcrypto_shared",
95    "//third_party/sqlite:sqlite",
96  ]
97  external_deps = [
98    "c_utils:utils",
99    "hilog:libhilog",
100  ]
101  part_name = "datamgr_service"
102}
103
104ohos_moduletest("DistributeddbKvTransactionPerfTest") {
105  module_out_path = module_output_path
106
107  sources = [
108    "common/distributeddb/src/distributed_test_sysinfo.cpp",
109    "common/distributeddb/src/distributeddb_data_generator.cpp",
110    "src/distributed_crud_transaction_tools.cpp",
111    "src/distributeddb_kv_transaction_perf_test.cpp",
112  ]
113  sources += mul_sources
114  configs = [ ":module_private_config" ]
115
116  deps = [
117    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
118    "//third_party/googletest:gtest_main",
119    "//third_party/openssl:libcrypto_shared",
120    "//third_party/sqlite:sqlite",
121  ]
122  external_deps = [
123    "c_utils:utils",
124    "hilog:libhilog",
125  ]
126  part_name = "datamgr_service"
127}
128ohos_moduletest("DistributeddbKvConcurrencyCrudTest") {
129  module_out_path = module_output_path
130
131  sources = [
132    "common/distributeddb/src/distributed_test_sysinfo.cpp",
133    "common/distributeddb/src/distributeddb_data_generator.cpp",
134    "src/distributeddb_kv_concurrency_crud_test.cpp",
135  ]
136  sources += mul_sources
137  configs = [ ":module_private_config" ]
138
139  deps = [
140    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
141    "//third_party/googletest:gtest_main",
142    "//third_party/openssl:libcrypto_shared",
143    "//third_party/sqlite:sqlite",
144  ]
145  external_deps = [
146    "c_utils:utils",
147    "hilog:libhilog",
148  ]
149  part_name = "datamgr_service"
150}
151ohos_moduletest("DistributeddbKvBatchCrudTest") {
152  module_out_path = module_output_path
153
154  sources = [
155    "common/distributeddb/src/distributed_test_sysinfo.cpp",
156    "common/distributeddb/src/distributeddb_data_generator.cpp",
157    "src/distributeddb_kv_batch_crud_test.cpp",
158  ]
159  sources += mul_sources
160  configs = [ ":module_private_config" ]
161
162  deps = [
163    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
164    "//third_party/googletest:gtest_main",
165    "//third_party/openssl:libcrypto_shared",
166    "//third_party/sqlite:sqlite",
167  ]
168  external_deps = [
169    "c_utils:utils",
170    "hilog:libhilog",
171  ]
172  part_name = "datamgr_service"
173}
174ohos_moduletest("DistributeddbKvCreateTest") {
175  module_out_path = module_output_path
176
177  sources = [
178    "common/distributeddb/src/distributed_test_sysinfo.cpp",
179    "common/distributeddb/src/distributeddb_data_generator.cpp",
180    "src/distributeddb_kv_create_test.cpp",
181  ]
182  sources += mul_sources
183  configs = [ ":module_private_config" ]
184
185  deps = [
186    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
187    "//third_party/googletest:gtest_main",
188    "//third_party/openssl:libcrypto_shared",
189    "//third_party/sqlite:sqlite",
190  ]
191  external_deps = [
192    "c_utils:utils",
193    "hilog:libhilog",
194  ]
195  part_name = "datamgr_service"
196}
197ohos_moduletest("DistributeddbKvCrudTest") {
198  module_out_path = module_output_path
199
200  sources = [
201    "common/distributeddb/src/distributed_test_sysinfo.cpp",
202    "common/distributeddb/src/distributeddb_data_generator.cpp",
203    "src/distributeddb_kv_crud_test.cpp",
204  ]
205  sources += mul_sources
206  configs = [ ":module_private_config" ]
207
208  deps = [
209    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
210    "//third_party/googletest:gtest_main",
211    "//third_party/openssl:libcrypto_shared",
212    "//third_party/sqlite:sqlite",
213  ]
214  external_deps = [
215    "c_utils:utils",
216    "hilog:libhilog",
217  ]
218  part_name = "datamgr_service"
219}
220ohos_moduletest("DistributeddbKvObserverTest") {
221  module_out_path = module_output_path
222
223  sources = [
224    "common/distributeddb/src/distributed_test_sysinfo.cpp",
225    "common/distributeddb/src/distributeddb_data_generator.cpp",
226    "src/distributeddb_kv_observer_test.cpp",
227  ]
228  sources += mul_sources
229  configs = [ ":module_private_config" ]
230
231  deps = [
232    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
233    "//third_party/googletest:gtest_main",
234    "//third_party/openssl:libcrypto_shared",
235    "//third_party/sqlite:sqlite",
236  ]
237  external_deps = [
238    "c_utils:utils",
239    "hilog:libhilog",
240  ]
241  part_name = "datamgr_service"
242}
243ohos_moduletest("DistributeddbKvObserverSnapTest") {
244  module_out_path = module_output_path
245
246  sources = [
247    "common/distributeddb/src/distributed_test_sysinfo.cpp",
248    "common/distributeddb/src/distributeddb_data_generator.cpp",
249    "src/distributeddb_kv_observer_snap_test.cpp",
250  ]
251  sources += mul_sources
252  configs = [ ":module_private_config" ]
253
254  deps = [
255    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
256    "//third_party/googletest:gtest_main",
257    "//third_party/openssl:libcrypto_shared",
258    "//third_party/sqlite:sqlite",
259  ]
260  external_deps = [
261    "c_utils:utils",
262    "hilog:libhilog",
263  ]
264  part_name = "datamgr_service"
265}
266
267ohos_moduletest("DistributeddbKvBackupTest") {
268  module_out_path = module_output_path
269  sources = [
270    "common/distributeddb/src/distributeddb_constant.cpp",
271    "common/distributeddb/src/distributeddb_data_generator.cpp",
272    "src/distributeddb_kv_backup_test.cpp",
273  ]
274  sources += mul_sources
275  configs = [ ":module_private_config" ]
276  deps = [
277    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
278    "//third_party/googletest:gtest_main",
279    "//third_party/openssl:libcrypto_shared",
280    "//third_party/sqlite:sqlite",
281  ]
282  external_deps = [
283    "c_utils:utils",
284    "hilog:libhilog",
285  ]
286  part_name = "datamgr_service"
287}
288
289ohos_moduletest("DistributeddbKvRealdelTest") {
290  module_out_path = module_output_path
291  sources = [
292    "common/distributeddb/src/distributeddb_constant.cpp",
293    "common/distributeddb/src/distributeddb_data_generator.cpp",
294    "src/distributeddb_kv_realdel_test.cpp",
295  ]
296  sources += mul_sources
297  configs = [ ":module_private_config" ]
298
299  deps = [
300    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
301    "//third_party/googletest:gtest_main",
302    "//third_party/openssl:libcrypto_shared",
303    "//third_party/sqlite:sqlite",
304  ]
305  external_deps = [
306    "c_utils:utils",
307    "hilog:libhilog",
308  ]
309  part_name = "datamgr_service"
310}
311
312ohos_moduletest("DistributeddbNbCreateTest") {
313  module_out_path = module_output_path
314
315  sources = [
316    "common/distributeddb/src/distributeddb_constant.cpp",
317    "common/distributeddb/src/distributeddb_data_generator.cpp",
318    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
319    "src/distributeddb_nb_create_test.cpp",
320  ]
321  sources += mul_sources
322  configs = [ ":module_private_config" ]
323
324  deps = [
325    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
326    "//third_party/googletest:gtest_main",
327    "//third_party/openssl:libcrypto_shared",
328    "//third_party/sqlite:sqlite",
329  ]
330  external_deps = [
331    "c_utils:utils",
332    "hilog:libhilog",
333  ]
334  part_name = "datamgr_service"
335}
336ohos_moduletest("DistributeddbNbCrudTest") {
337  module_out_path = module_output_path
338
339  sources = [
340    "common/distributeddb/src/distributeddb_constant.cpp",
341    "common/distributeddb/src/distributeddb_data_generator.cpp",
342    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
343    "src/distributeddb_nb_crud_test.cpp",
344  ]
345  sources += mul_sources
346  configs = [ ":module_private_config" ]
347
348  deps = [
349    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
350    "//third_party/googletest:gtest_main",
351    "//third_party/openssl:libcrypto_shared",
352    "//third_party/sqlite:sqlite",
353  ]
354  external_deps = [
355    "c_utils:utils",
356    "hilog:libhilog",
357  ]
358  part_name = "datamgr_service"
359}
360ohos_moduletest("DistributeddbNbObserverTest") {
361  module_out_path = module_output_path
362
363  sources = [
364    "common/distributeddb/src/distributeddb_constant.cpp",
365    "common/distributeddb/src/distributeddb_data_generator.cpp",
366    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
367    "src/distributeddb_nb_observer_test.cpp",
368  ]
369  sources += mul_sources
370  configs = [ ":module_private_config" ]
371
372  deps = [
373    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
374    "//third_party/googletest:gtest_main",
375    "//third_party/openssl:libcrypto_shared",
376    "//third_party/sqlite:sqlite",
377  ]
378  external_deps = [
379    "c_utils:utils",
380    "hilog:libhilog",
381  ]
382  part_name = "datamgr_service"
383}
384
385ohos_moduletest("DistributeddbNbCursorTest") {
386  module_out_path = module_output_path
387
388  sources = [
389    "common/distributeddb/src/distributeddb_constant.cpp",
390    "common/distributeddb/src/distributeddb_data_generator.cpp",
391    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
392    "src/distributeddb_nb_cursor_test.cpp",
393    "src/distributeddb_nb_cursor_testcase.cpp",
394  ]
395  sources += mul_sources
396  configs = [ ":module_private_config" ]
397
398  deps = [
399    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
400    "//third_party/googletest:gtest_main",
401    "//third_party/openssl:libcrypto_shared",
402    "//third_party/sqlite:sqlite",
403  ]
404  external_deps = [
405    "c_utils:utils",
406    "hilog:libhilog",
407  ]
408  part_name = "datamgr_service"
409}
410
411ohos_moduletest("DistributeddbNbBackupTest") {
412  module_out_path = module_output_path
413
414  sources = [
415    "common/distributeddb/src/distributeddb_constant.cpp",
416    "common/distributeddb/src/distributeddb_data_generator.cpp",
417    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
418    "src/distributeddb_nb_backup_test.cpp",
419  ]
420  sources += mul_sources
421  configs = [ ":module_private_config" ]
422
423  deps = [
424    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
425    "//third_party/googletest:gtest_main",
426    "//third_party/openssl:libcrypto_shared",
427    "//third_party/sqlite:sqlite",
428  ]
429
430  external_deps = [
431    "c_utils:utils",
432    "hilog:libhilog",
433  ]
434  part_name = "datamgr_service"
435}
436
437ohos_moduletest("DistributeddbNbBatchCrudTest") {
438  module_out_path = module_output_path
439
440  sources = [
441    "common/distributeddb/src/distributeddb_constant.cpp",
442    "common/distributeddb/src/distributeddb_data_generator.cpp",
443    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
444    "src/distributeddb_nb_batch_crud_test.cpp",
445  ]
446  sources += mul_sources
447  configs = [ ":module_private_config" ]
448
449  deps = [
450    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
451    "//third_party/googletest:gtest_main",
452    "//third_party/openssl:libcrypto_shared",
453    "//third_party/sqlite:sqlite",
454  ]
455  external_deps = [
456    "c_utils:utils",
457    "hilog:libhilog",
458  ]
459  part_name = "datamgr_service"
460}
461
462ohos_moduletest("DistributeddbNbLocalBatchCrudTest") {
463  module_out_path = module_output_path
464
465  sources = [
466    "common/distributeddb/src/distributeddb_constant.cpp",
467    "common/distributeddb/src/distributeddb_data_generator.cpp",
468    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
469    "src/distributeddb_nb_local_batch_crud_test.cpp",
470  ]
471  sources += mul_sources
472  configs = [ ":module_private_config" ]
473
474  deps = [
475    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
476    "//third_party/googletest:gtest_main",
477    "//third_party/openssl:libcrypto_shared",
478    "//third_party/sqlite:sqlite",
479  ]
480  external_deps = [
481    "c_utils:utils",
482    "hilog:libhilog",
483  ]
484  part_name = "datamgr_service"
485}
486
487ohos_moduletest("DistributeddbNbSchemaDbTest") {
488  module_out_path = module_output_path
489
490  sources = [
491    "common/distributeddb/src/distributeddb_constant.cpp",
492    "common/distributeddb/src/distributeddb_data_generator.cpp",
493    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
494    "src/distributeddb_nb_schema_test.cpp",
495  ]
496  sources += mul_sources
497  configs = [ ":module_private_config" ]
498  deps = [
499    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
500    "//third_party/googletest:gtest_main",
501    "//third_party/openssl:libcrypto_shared",
502    "//third_party/sqlite:sqlite",
503  ]
504  external_deps = [
505    "c_utils:utils",
506    "hilog:libhilog",
507  ]
508  part_name = "datamgr_service"
509}
510
511ohos_moduletest("DistributeddbNbPredicateQueryTest") {
512  module_out_path = module_output_path
513
514  sources = [
515    "common/distributeddb/src/distributeddb_constant.cpp",
516    "common/distributeddb/src/distributeddb_data_generator.cpp",
517    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
518    "src/distributeddb_nb_predicate_query_test.cpp",
519  ]
520  sources += mul_sources
521  configs = [ ":module_private_config" ]
522
523  deps = [
524    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
525    "//third_party/googletest:gtest_main",
526    "//third_party/openssl:libcrypto_shared",
527    "//third_party/sqlite:sqlite",
528  ]
529  external_deps = [
530    "c_utils:utils",
531    "hilog:libhilog",
532  ]
533  part_name = "datamgr_service"
534}
535
536ohos_moduletest("DistributeddbNbPredicateQueryExpandTest") {
537  module_out_path = module_output_path
538  sources = [
539    "common/distributeddb/src/distributeddb_constant.cpp",
540    "common/distributeddb/src/distributeddb_data_generator.cpp",
541    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
542    "common/distributeddb/src/distributeddb_schema_test_tools.cpp",
543    "src/distributeddb_nb_predicate_query_expand_test.cpp",
544  ]
545  sources += mul_sources
546  configs = [ ":module_private_config" ]
547
548  deps = [
549    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
550    "//third_party/googletest:gtest_main",
551    "//third_party/openssl:libcrypto_shared",
552    "//third_party/sqlite:sqlite",
553  ]
554  external_deps = [
555    "c_utils:utils",
556    "hilog:libhilog",
557  ]
558  part_name = "datamgr_service"
559}
560
561ohos_moduletest("DistributeddbNbAutolaunchTest") {
562  module_out_path = module_output_path
563  sources = [
564    "common/distributeddb/src/distributeddb_constant.cpp",
565    "common/distributeddb/src/distributeddb_data_generator.cpp",
566    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
567    "common/distributeddb/src/distributeddb_schema_test_tools.cpp",
568    "src/distributeddb_nb_autolaunch_test.cpp",
569  ]
570  sources += mul_sources
571  configs = [ ":module_private_config" ]
572
573  deps = [
574    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
575    "//third_party/googletest:gtest_main",
576    "//third_party/openssl:libcrypto_shared",
577    "//third_party/sqlite:sqlite",
578  ]
579  external_deps = [
580    "c_utils:utils",
581    "hilog:libhilog",
582  ]
583  part_name = "datamgr_service"
584}
585
586ohos_moduletest("DistributedbNbDbDamageTest") {
587  module_out_path = module_output_path
588  sources = [
589    "common/distributeddb/src/distributeddb_constant.cpp",
590    "common/distributeddb/src/distributeddb_data_generator.cpp",
591    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
592    "common/distributeddb/src/distributeddb_schema_test_tools.cpp",
593    "src/distributeddb_nb_db_damage_test.cpp",
594  ]
595  sources += mul_sources
596  configs = [ ":module_private_config" ]
597
598  deps = [
599    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
600    "//third_party/googletest:gtest_main",
601    "//third_party/openssl:libcrypto_shared",
602    "//third_party/sqlite:sqlite",
603  ]
604  external_deps = [
605    "c_utils:utils",
606    "hilog:libhilog",
607  ]
608  part_name = "datamgr_service"
609}
610
611ohos_moduletest("DistributeddbNbCrudPowerTest") {
612  module_out_path = module_output_path
613  sources = [
614    "common/distributeddb/src/distributeddb_constant.cpp",
615    "common/distributeddb/src/distributeddb_data_generator.cpp",
616    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
617    "common/distributeddb/src/distributeddb_schema_test_tools.cpp",
618    "src/distributeddb_nb_crud_power_test.cpp",
619  ]
620  sources += mul_sources
621  configs = [ ":module_private_config" ]
622
623  deps = [
624    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
625    "//third_party/googletest:gtest_main",
626    "//third_party/openssl:libcrypto_shared",
627    "//third_party/sqlite:sqlite",
628  ]
629  external_deps = [
630    "c_utils:utils",
631    "hilog:libhilog",
632  ]
633  part_name = "datamgr_service"
634}
635
636ohos_moduletest("DistributeddbNbSchemaTest") {
637  module_out_path = module_output_path
638  sources = [
639    "common/distributeddb/src/distributeddb_constant.cpp",
640    "common/distributeddb/src/distributeddb_data_generator.cpp",
641    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
642    "common/distributeddb/src/distributeddb_schema_test_tools.cpp",
643    "src/distributeddb_nb_schema_test.cpp",
644  ]
645  sources += mul_sources
646  configs = [ ":module_private_config" ]
647
648  deps = [
649    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
650    "//third_party/googletest:gtest_main",
651    "//third_party/openssl:libcrypto_shared",
652    "//third_party/sqlite:sqlite",
653  ]
654  external_deps = [
655    "c_utils:utils",
656    "hilog:libhilog",
657  ]
658  part_name = "datamgr_service"
659}
660
661ohos_moduletest("DistributeddbNbSchemaUpgradeTest") {
662  module_out_path = module_output_path
663  sources = [
664    "common/distributeddb/src/distributeddb_constant.cpp",
665    "common/distributeddb/src/distributeddb_data_generator.cpp",
666    "common/distributeddb/src/distributeddb_nb_test_tools.cpp",
667    "common/distributeddb/src/distributeddb_schema_test_tools.cpp",
668    "src/distributeddb_nb_schema_upgrade_test.cpp",
669  ]
670  sources += mul_sources
671  configs = [ ":module_private_config" ]
672
673  deps = [
674    "//foundation/distributeddatamgr/kv_store/frameworks/libs/distributeddb:distributeddb",
675    "//third_party/googletest:gtest_main",
676    "//third_party/openssl:libcrypto_shared",
677    "//third_party/sqlite:sqlite",
678  ]
679  external_deps = [
680    "c_utils:utils",
681    "hilog:libhilog",
682  ]
683  part_name = "datamgr_service"
684}
685
686###############################################################################
687group("moduletest") {
688  testonly = true
689  deps = [
690    "//third_party/googletest:gmock",
691    "//third_party/googletest:gtest_main",
692    "//third_party/sqlite:sqlite",
693  ]
694
695  deps += [
696    ":DistributedbNbDbDamageTest",
697    ":DistributeddbKvBackupTest",
698    ":DistributeddbKvBatchCrudTest",
699    ":DistributeddbKvConcurrencyCrudTest",
700    ":DistributeddbKvCreateTest",
701    ":DistributeddbKvCrudTest",
702    ":DistributeddbKvObserverSnapTest",
703    ":DistributeddbKvObserverTest",
704    ":DistributeddbKvRealdelTest",
705    ":DistributeddbKvTransactionPerfTest",
706    ":DistributeddbKvTransactionTest",
707    ":DistributeddbNbAutolaunchTest",
708    ":DistributeddbNbBackupTest",
709    ":DistributeddbNbBatchCrudTest",
710    ":DistributeddbNbCreateTest",
711    ":DistributeddbNbCrudPowerTest",
712    ":DistributeddbNbCrudTest",
713    ":DistributeddbNbCursorTest",
714    ":DistributeddbNbLocalBatchCrudTest",
715    ":DistributeddbNbObserverTest",
716    ":DistributeddbNbPredicateQueryExpandTest",
717    ":DistributeddbNbPredicateQueryTest",
718    ":DistributeddbNbSchemaTest",
719    ":DistributeddbNbSchemaUpgradeTest",
720  ]
721}
722