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