CMakeLists.txt 20.1 KB
Newer Older
M
Minghao Li 已提交
1
add_executable(syncTest "")
2
add_executable(syncRaftIdCheck "")
M
Minghao Li 已提交
3
add_executable(syncEnvTest "")
M
Minghao Li 已提交
4
add_executable(syncPingTimerTest "")
M
sync io  
Minghao Li 已提交
5 6
add_executable(syncIOTickQTest "")
add_executable(syncIOTickPingTest "")
M
sync io  
Minghao Li 已提交
7
add_executable(syncIOSendMsgTest "")
M
Minghao Li 已提交
8 9
add_executable(syncIOClientTest "")
add_executable(syncIOServerTest "")
M
Minghao Li 已提交
10
add_executable(syncRaftStoreTest "")
M
Minghao Li 已提交
11
add_executable(syncEnqTest "")
M
Minghao Li 已提交
12
add_executable(syncIndexTest "")
M
Minghao Li 已提交
13
add_executable(syncInitTest "")
M
Minghao Li 已提交
14
add_executable(syncUtilTest "")
M
Minghao Li 已提交
15
add_executable(syncVotesGrantedTest "")
M
Minghao Li 已提交
16
add_executable(syncVotesRespondTest "")
M
Minghao Li 已提交
17
add_executable(syncIndexMgrTest "")
M
Minghao Li 已提交
18
add_executable(syncLogStoreTest "")
M
Minghao Li 已提交
19
add_executable(syncEntryTest "")
M
Minghao Li 已提交
20
add_executable(syncEntryCacheTest "")
21
add_executable(syncHashCacheTest "")
M
Minghao Li 已提交
22 23 24
add_executable(syncRequestVoteTest "")
add_executable(syncRequestVoteReplyTest "")
add_executable(syncAppendEntriesTest "")
25
add_executable(syncAppendEntriesBatchTest "")
M
Minghao Li 已提交
26
add_executable(syncAppendEntriesReplyTest "")
M
Minghao Li 已提交
27
add_executable(syncClientRequestTest "")
28
add_executable(syncClientRequestBatchTest "")
M
Minghao Li 已提交
29
add_executable(syncTimeoutTest "")
M
Minghao Li 已提交
30 31
add_executable(syncPingTest "")
add_executable(syncPingReplyTest "")
M
Minghao Li 已提交
32
add_executable(syncRpcMsgTest "")
M
Minghao Li 已提交
33 34
add_executable(syncPingTimerTest2 "")
add_executable(syncPingSelfTest "")
M
Minghao Li 已提交
35
add_executable(syncElectTest "")
M
Minghao Li 已提交
36
add_executable(syncEncodeTest "")
M
Minghao Li 已提交
37
add_executable(syncWriteTest "")
M
Minghao Li 已提交
38
add_executable(syncReplicateTest "")
M
Minghao Li 已提交
39
add_executable(syncRefTest "")
M
Minghao Li 已提交
40
add_executable(syncLogStoreCheck "")
41
add_executable(syncLogStoreCheck2 "")
M
Minghao Li 已提交
42 43
add_executable(syncRaftCfgTest "")
add_executable(syncRespMgrTest "")
M
Minghao Li 已提交
44
add_executable(syncSnapshotTest "")
M
Minghao Li 已提交
45
add_executable(syncApplyMsgTest "")
M
Minghao Li 已提交
46
add_executable(syncConfigChangeTest "")
M
Minghao Li 已提交
47
add_executable(syncConfigChangeSnapshotTest "")
48
add_executable(syncSnapshotSendTest "")
49
add_executable(syncSnapshotRspTest "")
M
Minghao Li 已提交
50 51
add_executable(syncSnapshotSenderTest "")
add_executable(syncSnapshotReceiverTest "")
M
Minghao Li 已提交
52
add_executable(syncTestTool "")
M
Minghao Li 已提交
53 54 55
add_executable(syncRaftLogTest "")
add_executable(syncRaftLogTest2 "")
add_executable(syncRaftLogTest3 "")
56
add_executable(syncLeaderTransferTest "")
M
Minghao Li 已提交
57
add_executable(syncReconfigFinishTest "")
58
add_executable(syncRestoreFromSnapshot "")
59
add_executable(syncRaftCfgIndexTest "")
M
Minghao Li 已提交
60
add_executable(syncHeartbeatTest "")
61
add_executable(syncHeartbeatReplyTest "")
M
Minghao Li 已提交
62
add_executable(syncLocalCmdTest "")
M
Minghao Li 已提交
63
add_executable(syncPreSnapshotTest "")
M
Minghao Li 已提交
64
add_executable(syncPreSnapshotReplyTest "")
M
Minghao Li 已提交
65 66 67 68 69 70


target_sources(syncTest
    PRIVATE
    "syncTest.cpp"
)
71 72 73 74
target_sources(syncRaftIdCheck
    PRIVATE
    "syncRaftIdCheck.cpp"
)
M
Minghao Li 已提交
75 76 77 78
target_sources(syncEnvTest
    PRIVATE
    "syncEnvTest.cpp"
)
M
Minghao Li 已提交
79
target_sources(syncPingTimerTest
M
Minghao Li 已提交
80
    PRIVATE
M
Minghao Li 已提交
81
    "syncPingTimerTest.cpp"
M
Minghao Li 已提交
82
)
M
sync io  
Minghao Li 已提交
83
target_sources(syncIOTickQTest
M
sync io  
Minghao Li 已提交
84
    PRIVATE
M
sync io  
Minghao Li 已提交
85
    "syncIOTickQTest.cpp"
M
sync io  
Minghao Li 已提交
86
)
M
sync io  
Minghao Li 已提交
87
target_sources(syncIOTickPingTest
M
sync io  
Minghao Li 已提交
88
    PRIVATE
M
sync io  
Minghao Li 已提交
89
    "syncIOTickPingTest.cpp"
M
sync io  
Minghao Li 已提交
90
)
M
sync io  
Minghao Li 已提交
91 92 93 94
target_sources(syncIOSendMsgTest
    PRIVATE
    "syncIOSendMsgTest.cpp"
)
M
Minghao Li 已提交
95
target_sources(syncIOClientTest
M
sync io  
Minghao Li 已提交
96
    PRIVATE
M
Minghao Li 已提交
97
    "syncIOClientTest.cpp"
M
sync io  
Minghao Li 已提交
98
)
M
Minghao Li 已提交
99
target_sources(syncIOServerTest
M
sync io  
Minghao Li 已提交
100
    PRIVATE
M
Minghao Li 已提交
101
    "syncIOServerTest.cpp"
M
sync io  
Minghao Li 已提交
102
)
M
Minghao Li 已提交
103 104 105 106
target_sources(syncRaftStoreTest
    PRIVATE
    "syncRaftStoreTest.cpp"
)
M
Minghao Li 已提交
107 108 109 110
target_sources(syncEnqTest
    PRIVATE
    "syncEnqTest.cpp"
)
M
Minghao Li 已提交
111 112 113 114
target_sources(syncIndexTest
    PRIVATE
    "syncIndexTest.cpp"
)
M
Minghao Li 已提交
115 116 117 118
target_sources(syncInitTest
    PRIVATE
    "syncInitTest.cpp"
)
M
Minghao Li 已提交
119 120 121 122
target_sources(syncUtilTest
    PRIVATE
    "syncUtilTest.cpp"
)
M
Minghao Li 已提交
123 124 125 126
target_sources(syncVotesGrantedTest
    PRIVATE
    "syncVotesGrantedTest.cpp"
)
M
Minghao Li 已提交
127 128 129 130
target_sources(syncVotesRespondTest
    PRIVATE
    "syncVotesRespondTest.cpp"
)
M
Minghao Li 已提交
131 132 133 134
target_sources(syncIndexMgrTest
    PRIVATE
    "syncIndexMgrTest.cpp"
)
M
Minghao Li 已提交
135 136 137 138
target_sources(syncLogStoreTest
    PRIVATE
    "syncLogStoreTest.cpp"
)
M
Minghao Li 已提交
139 140 141 142
target_sources(syncEntryTest
    PRIVATE
    "syncEntryTest.cpp"
)
M
Minghao Li 已提交
143 144 145 146
target_sources(syncEntryCacheTest
    PRIVATE
    "syncEntryCacheTest.cpp"
)
147 148 149 150
target_sources(syncHashCacheTest
    PRIVATE
    "syncHashCacheTest.cpp"
)
M
Minghao Li 已提交
151
target_sources(syncRequestVoteTest
M
Minghao Li 已提交
152
    PRIVATE
M
Minghao Li 已提交
153
    "syncRequestVoteTest.cpp"
M
Minghao Li 已提交
154
)
M
Minghao Li 已提交
155
target_sources(syncRequestVoteReplyTest
M
Minghao Li 已提交
156
    PRIVATE
M
Minghao Li 已提交
157 158 159 160 161 162
    "syncRequestVoteReplyTest.cpp"
)
target_sources(syncAppendEntriesTest
    PRIVATE
    "syncAppendEntriesTest.cpp"
)
163 164 165 166
target_sources(syncAppendEntriesBatchTest
    PRIVATE
    "syncAppendEntriesBatchTest.cpp"
)
M
Minghao Li 已提交
167 168 169
target_sources(syncAppendEntriesReplyTest
    PRIVATE
    "syncAppendEntriesReplyTest.cpp"
M
Minghao Li 已提交
170
)
M
Minghao Li 已提交
171 172 173 174
target_sources(syncClientRequestTest
    PRIVATE
    "syncClientRequestTest.cpp"
)
175 176 177 178
target_sources(syncClientRequestBatchTest
    PRIVATE
    "syncClientRequestBatchTest.cpp"
)
M
Minghao Li 已提交
179 180 181 182
target_sources(syncTimeoutTest
    PRIVATE
    "syncTimeoutTest.cpp"
)
M
Minghao Li 已提交
183 184 185 186 187 188 189 190
target_sources(syncPingTest
    PRIVATE
    "syncPingTest.cpp"
)
target_sources(syncPingReplyTest
    PRIVATE
    "syncPingReplyTest.cpp"
)
M
Minghao Li 已提交
191 192 193 194
target_sources(syncRpcMsgTest
    PRIVATE
    "syncRpcMsgTest.cpp"
)
M
Minghao Li 已提交
195 196 197 198 199 200 201 202
target_sources(syncPingTimerTest2
    PRIVATE
    "syncPingTimerTest2.cpp"
)
target_sources(syncPingSelfTest
    PRIVATE
    "syncPingSelfTest.cpp"
)
M
Minghao Li 已提交
203 204 205 206
target_sources(syncElectTest
    PRIVATE
    "syncElectTest.cpp"
)
M
Minghao Li 已提交
207 208 209 210
target_sources(syncEncodeTest
    PRIVATE
    "syncEncodeTest.cpp"
)
M
Minghao Li 已提交
211 212 213 214
target_sources(syncWriteTest
    PRIVATE
    "syncWriteTest.cpp"
)
M
Minghao Li 已提交
215 216 217 218
target_sources(syncReplicateTest
    PRIVATE
    "syncReplicateTest.cpp"
)
M
Minghao Li 已提交
219 220 221 222
target_sources(syncRefTest
    PRIVATE
    "syncRefTest.cpp"
)
M
Minghao Li 已提交
223 224 225 226
target_sources(syncLogStoreCheck
    PRIVATE
    "syncLogStoreCheck.cpp"
)
227 228 229 230
target_sources(syncLogStoreCheck2
    PRIVATE
    "syncLogStoreCheck2.cpp"
)
M
Minghao Li 已提交
231 232 233 234 235 236 237 238
target_sources(syncRaftCfgTest
    PRIVATE
    "syncRaftCfgTest.cpp"
)
target_sources(syncRespMgrTest
    PRIVATE
    "syncRespMgrTest.cpp"
)
M
Minghao Li 已提交
239 240 241 242
target_sources(syncSnapshotTest
    PRIVATE
    "syncSnapshotTest.cpp"
)
M
Minghao Li 已提交
243 244 245 246
target_sources(syncApplyMsgTest
    PRIVATE
    "syncApplyMsgTest.cpp"
)
M
Minghao Li 已提交
247 248 249 250
target_sources(syncConfigChangeTest
    PRIVATE
    "syncConfigChangeTest.cpp"
)
M
Minghao Li 已提交
251 252 253 254
target_sources(syncConfigChangeSnapshotTest
    PRIVATE
    "syncConfigChangeSnapshotTest.cpp"
)
255 256 257 258
target_sources(syncSnapshotSendTest
    PRIVATE
    "syncSnapshotSendTest.cpp"
)
259 260 261 262
target_sources(syncSnapshotRspTest
    PRIVATE
    "syncSnapshotRspTest.cpp"
)
M
Minghao Li 已提交
263 264 265 266 267 268 269 270
target_sources(syncSnapshotSenderTest
    PRIVATE
    "syncSnapshotSenderTest.cpp"
)
target_sources(syncSnapshotReceiverTest
    PRIVATE
    "syncSnapshotReceiverTest.cpp"
)
M
Minghao Li 已提交
271 272 273 274
target_sources(syncTestTool
    PRIVATE
    "syncTestTool.cpp"
)
M
Minghao Li 已提交
275 276 277 278 279 280 281 282 283 284 285 286
target_sources(syncRaftLogTest
    PRIVATE
    "syncRaftLogTest.cpp"
)
target_sources(syncRaftLogTest2
    PRIVATE
    "syncRaftLogTest2.cpp"
)
target_sources(syncRaftLogTest3
    PRIVATE
    "syncRaftLogTest3.cpp"
)
287 288 289 290
target_sources(syncLeaderTransferTest
    PRIVATE
    "syncLeaderTransferTest.cpp"
)
M
Minghao Li 已提交
291 292 293 294
target_sources(syncReconfigFinishTest
    PRIVATE
    "syncReconfigFinishTest.cpp"
)
295 296 297 298
target_sources(syncRestoreFromSnapshot
    PRIVATE
    "syncRestoreFromSnapshot.cpp"
)
299 300 301 302
target_sources(syncRaftCfgIndexTest
    PRIVATE
    "syncRaftCfgIndexTest.cpp"
)
M
Minghao Li 已提交
303 304 305 306
target_sources(syncHeartbeatTest
    PRIVATE
    "syncHeartbeatTest.cpp"
)
307 308 309 310
target_sources(syncHeartbeatReplyTest
    PRIVATE
    "syncHeartbeatReplyTest.cpp"
)
M
Minghao Li 已提交
311 312 313 314
target_sources(syncLocalCmdTest
    PRIVATE
    "syncLocalCmdTest.cpp"
)
M
Minghao Li 已提交
315 316 317 318
target_sources(syncPreSnapshotTest
    PRIVATE
    "syncPreSnapshotTest.cpp"
)
M
Minghao Li 已提交
319 320 321 322
target_sources(syncPreSnapshotReplyTest
    PRIVATE
    "syncPreSnapshotReplyTest.cpp"
)
M
Minghao Li 已提交
323 324 325 326


target_include_directories(syncTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
327
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
328 329
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
330 331 332 333 334
target_include_directories(syncRaftIdCheck
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
335 336
target_include_directories(syncEnvTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
337
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
338 339
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
340
target_include_directories(syncPingTimerTest
M
Minghao Li 已提交
341
    PUBLIC
wafwerar's avatar
wafwerar 已提交
342
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
343 344
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
sync io  
Minghao Li 已提交
345
target_include_directories(syncIOTickQTest
M
sync io  
Minghao Li 已提交
346
    PUBLIC
wafwerar's avatar
wafwerar 已提交
347
    "${TD_SOURCE_DIR}/include/libs/sync"
M
sync io  
Minghao Li 已提交
348 349
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
sync io  
Minghao Li 已提交
350
target_include_directories(syncIOTickPingTest
M
sync io  
Minghao Li 已提交
351
    PUBLIC
wafwerar's avatar
wafwerar 已提交
352
    "${TD_SOURCE_DIR}/include/libs/sync"
M
sync io  
Minghao Li 已提交
353 354
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
sync io  
Minghao Li 已提交
355 356
target_include_directories(syncIOSendMsgTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
357
    "${TD_SOURCE_DIR}/include/libs/sync"
M
sync io  
Minghao Li 已提交
358 359
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
360
target_include_directories(syncIOClientTest
M
sync io  
Minghao Li 已提交
361
    PUBLIC
wafwerar's avatar
wafwerar 已提交
362
    "${TD_SOURCE_DIR}/include/libs/sync"
M
sync io  
Minghao Li 已提交
363 364
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
365
target_include_directories(syncIOServerTest
M
sync io  
Minghao Li 已提交
366
    PUBLIC
wafwerar's avatar
wafwerar 已提交
367
    "${TD_SOURCE_DIR}/include/libs/sync"
M
sync io  
Minghao Li 已提交
368 369
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
370 371
target_include_directories(syncRaftStoreTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
372
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
373 374
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
375 376
target_include_directories(syncEnqTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
377
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
378 379
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
380 381
target_include_directories(syncIndexTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
382
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
383 384
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
385 386
target_include_directories(syncInitTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
387
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
388 389
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
390 391
target_include_directories(syncUtilTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
392
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
393 394
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
395 396
target_include_directories(syncVotesGrantedTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
397
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
398 399
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
400 401
target_include_directories(syncVotesRespondTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
402
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
403 404
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
405 406
target_include_directories(syncIndexMgrTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
407
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
408 409
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
410 411
target_include_directories(syncLogStoreTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
412
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
413 414
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
415 416
target_include_directories(syncEntryTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
417
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
418 419
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
420 421 422 423 424
target_include_directories(syncEntryCacheTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
425 426 427 428 429
target_include_directories(syncHashCacheTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
430 431
target_include_directories(syncRequestVoteTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
432
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
433 434 435 436
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncRequestVoteReplyTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
437
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
438 439 440
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncAppendEntriesTest
M
Minghao Li 已提交
441
    PUBLIC
wafwerar's avatar
wafwerar 已提交
442
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
443 444
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
445 446 447 448 449
target_include_directories(syncAppendEntriesBatchTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
450
target_include_directories(syncAppendEntriesReplyTest
M
Minghao Li 已提交
451
    PUBLIC
wafwerar's avatar
wafwerar 已提交
452
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
453 454
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
455 456
target_include_directories(syncClientRequestTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
457
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
458 459
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
460 461 462 463 464
target_include_directories(syncClientRequestBatchTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
465 466
target_include_directories(syncTimeoutTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
467
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
468 469
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
470 471
target_include_directories(syncPingTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
472
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
473 474 475 476
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncPingReplyTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
477
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
478 479
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
480 481
target_include_directories(syncRpcMsgTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
482
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
483 484
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
485 486
target_include_directories(syncPingTimerTest2
    PUBLIC
wafwerar's avatar
wafwerar 已提交
487
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
488 489 490 491
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncPingSelfTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
492
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
493 494
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
495 496
target_include_directories(syncElectTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
497
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
498 499
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
500 501
target_include_directories(syncEncodeTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
502
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
503 504
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
505 506
target_include_directories(syncWriteTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
507
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
508 509
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
510 511
target_include_directories(syncReplicateTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
512
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
513 514
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
515 516
target_include_directories(syncRefTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
517
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
518 519
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
520 521
target_include_directories(syncLogStoreCheck
    PUBLIC
wafwerar's avatar
wafwerar 已提交
522
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
523 524
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
525 526 527 528 529
target_include_directories(syncLogStoreCheck2
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
530 531
target_include_directories(syncRaftCfgTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
532
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
533 534 535 536
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncRespMgrTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
537
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
538 539
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
540 541
target_include_directories(syncSnapshotTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
542
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
543 544
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
545 546
target_include_directories(syncApplyMsgTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
547
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
548 549
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
550 551 552 553 554
target_include_directories(syncConfigChangeTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
555 556 557 558 559
target_include_directories(syncConfigChangeSnapshotTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
560 561 562 563 564
target_include_directories(syncSnapshotSendTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
565 566 567 568 569
target_include_directories(syncSnapshotRspTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
570 571 572 573 574 575 576 577 578 579
target_include_directories(syncSnapshotSenderTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncSnapshotReceiverTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
580 581 582 583 584
target_include_directories(syncTestTool
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599
target_include_directories(syncRaftLogTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncRaftLogTest2
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncRaftLogTest3
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
600 601 602 603 604
target_include_directories(syncLeaderTransferTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
605 606 607 608 609
target_include_directories(syncReconfigFinishTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
610 611 612 613 614
target_include_directories(syncRestoreFromSnapshot
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
615 616 617 618 619
target_include_directories(syncRaftCfgIndexTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
620 621 622 623 624
target_include_directories(syncHeartbeatTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
625 626 627 628 629
target_include_directories(syncHeartbeatReplyTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
630 631 632 633 634
target_include_directories(syncLocalCmdTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
635 636 637 638 639
target_include_directories(syncPreSnapshotTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
640 641 642 643 644
target_include_directories(syncPreSnapshotReplyTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
645 646 647 648 649 650


target_link_libraries(syncTest
    sync
    gtest_main
)
651 652 653 654
target_link_libraries(syncRaftIdCheck
    sync
    gtest_main
)
M
Minghao Li 已提交
655 656 657 658
target_link_libraries(syncEnvTest
    sync
    gtest_main
)
M
Minghao Li 已提交
659
target_link_libraries(syncPingTimerTest
M
Minghao Li 已提交
660 661 662
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
663
target_link_libraries(syncIOTickQTest
M
sync io  
Minghao Li 已提交
664 665 666
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
667
target_link_libraries(syncIOTickPingTest
M
sync io  
Minghao Li 已提交
668 669 670
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
671 672 673 674
target_link_libraries(syncIOSendMsgTest
    sync
    gtest_main
)
M
Minghao Li 已提交
675
target_link_libraries(syncIOClientTest
M
sync io  
Minghao Li 已提交
676 677 678
    sync
    gtest_main
)
M
Minghao Li 已提交
679
target_link_libraries(syncIOServerTest
M
sync io  
Minghao Li 已提交
680 681 682
    sync
    gtest_main
)
M
Minghao Li 已提交
683 684 685 686
target_link_libraries(syncRaftStoreTest
    sync
    gtest_main
)
M
Minghao Li 已提交
687 688 689 690
target_link_libraries(syncEnqTest
    sync
    gtest_main
)
M
Minghao Li 已提交
691 692 693 694
target_link_libraries(syncIndexTest
    sync
    gtest_main
)
M
Minghao Li 已提交
695 696 697 698
target_link_libraries(syncInitTest
    sync
    gtest_main
)
M
Minghao Li 已提交
699 700 701 702
target_link_libraries(syncUtilTest
    sync
    gtest_main
)
M
Minghao Li 已提交
703 704 705 706
target_link_libraries(syncVotesGrantedTest
    sync
    gtest_main
)
M
Minghao Li 已提交
707 708 709 710
target_link_libraries(syncVotesRespondTest
    sync
    gtest_main
)
M
Minghao Li 已提交
711 712 713 714
target_link_libraries(syncIndexMgrTest
    sync
    gtest_main
)
M
Minghao Li 已提交
715 716 717 718
target_link_libraries(syncLogStoreTest
    sync
    gtest_main
)
M
Minghao Li 已提交
719 720 721 722
target_link_libraries(syncEntryTest
    sync
    gtest_main
)
M
Minghao Li 已提交
723 724 725 726
target_link_libraries(syncEntryCacheTest
    sync
    gtest_main
)
727 728 729 730
target_link_libraries(syncHashCacheTest
    sync
    gtest_main
)
M
Minghao Li 已提交
731 732 733 734 735 736 737 738 739
target_link_libraries(syncRequestVoteTest
    sync
    gtest_main
)
target_link_libraries(syncRequestVoteReplyTest
    sync
    gtest_main
)
target_link_libraries(syncAppendEntriesTest
M
Minghao Li 已提交
740 741 742
    sync
    gtest_main
)
743 744 745 746
target_link_libraries(syncAppendEntriesBatchTest
    sync
    gtest_main
)
M
Minghao Li 已提交
747
target_link_libraries(syncAppendEntriesReplyTest
M
Minghao Li 已提交
748 749 750
    sync
    gtest_main
)
M
Minghao Li 已提交
751 752 753 754
target_link_libraries(syncClientRequestTest
    sync
    gtest_main
)
755 756 757 758
target_link_libraries(syncClientRequestBatchTest
    sync
    gtest_main
)
M
Minghao Li 已提交
759 760 761 762
target_link_libraries(syncTimeoutTest
    sync
    gtest_main
)
M
Minghao Li 已提交
763 764 765 766 767 768 769 770
target_link_libraries(syncPingTest
    sync
    gtest_main
)
target_link_libraries(syncPingReplyTest
    sync
    gtest_main
)
M
Minghao Li 已提交
771 772 773 774
target_link_libraries(syncRpcMsgTest
    sync
    gtest_main
)
M
Minghao Li 已提交
775 776 777 778 779 780 781 782
target_link_libraries(syncPingTimerTest2
    sync
    gtest_main
)
target_link_libraries(syncPingSelfTest
    sync
    gtest_main
)
M
Minghao Li 已提交
783 784 785 786
target_link_libraries(syncElectTest
    sync
    gtest_main
)
M
Minghao Li 已提交
787 788 789 790
target_link_libraries(syncEncodeTest
    sync
    gtest_main
)
M
Minghao Li 已提交
791 792 793 794
target_link_libraries(syncWriteTest
    sync
    gtest_main
)
M
Minghao Li 已提交
795 796 797 798
target_link_libraries(syncReplicateTest
    sync
    gtest_main
)
M
Minghao Li 已提交
799 800 801 802
target_link_libraries(syncRefTest
    sync
    gtest_main
)
M
Minghao Li 已提交
803 804 805 806
target_link_libraries(syncLogStoreCheck
    sync
    gtest_main
)
807 808 809 810
target_link_libraries(syncLogStoreCheck2
    sync
    gtest_main
)
M
Minghao Li 已提交
811 812 813 814 815 816 817 818
target_link_libraries(syncRaftCfgTest
    sync
    gtest_main
)
target_link_libraries(syncRespMgrTest
    sync
    gtest_main
)
M
Minghao Li 已提交
819 820 821 822
target_link_libraries(syncSnapshotTest
    sync
    gtest_main
)
M
Minghao Li 已提交
823 824 825 826
target_link_libraries(syncApplyMsgTest
    sync
    gtest_main
)
M
Minghao Li 已提交
827 828 829 830
target_link_libraries(syncConfigChangeTest
    sync
    gtest_main
)
M
Minghao Li 已提交
831 832 833 834
target_link_libraries(syncConfigChangeSnapshotTest
    sync
    gtest_main
)
835 836 837 838
target_link_libraries(syncSnapshotSendTest
    sync
    gtest_main
)
839 840 841 842
target_link_libraries(syncSnapshotRspTest
    sync
    gtest_main
)
M
Minghao Li 已提交
843 844 845 846 847 848 849 850
target_link_libraries(syncSnapshotSenderTest
    sync
    gtest_main
)
target_link_libraries(syncSnapshotReceiverTest
    sync
    gtest_main
)
M
Minghao Li 已提交
851 852 853 854
target_link_libraries(syncTestTool
    sync
    gtest_main
)
M
Minghao Li 已提交
855 856 857 858 859 860 861 862 863 864 865 866
target_link_libraries(syncRaftLogTest
    sync
    gtest_main
)
target_link_libraries(syncRaftLogTest2
    sync
    gtest_main
)
target_link_libraries(syncRaftLogTest3
    sync
    gtest_main
)
867 868 869 870
target_link_libraries(syncLeaderTransferTest
    sync
    gtest_main
)
M
Minghao Li 已提交
871 872 873 874
target_link_libraries(syncReconfigFinishTest
    sync
    gtest_main
)
875 876 877 878
target_link_libraries(syncRestoreFromSnapshot
    sync
    gtest_main
)
879 880 881 882
target_link_libraries(syncRaftCfgIndexTest
    sync
    gtest_main
)
M
Minghao Li 已提交
883 884 885 886
target_link_libraries(syncHeartbeatTest
    sync
    gtest_main
)
887 888 889 890
target_link_libraries(syncHeartbeatReplyTest
    sync
    gtest_main
)
M
Minghao Li 已提交
891 892 893 894
target_link_libraries(syncLocalCmdTest
    sync
    gtest_main
)
M
Minghao Li 已提交
895 896 897 898
target_link_libraries(syncPreSnapshotTest
    sync
    gtest_main
)
M
Minghao Li 已提交
899 900 901 902
target_link_libraries(syncPreSnapshotReplyTest
    sync
    gtest_main
)
M
Minghao Li 已提交
903 904 905 906 907 908 909


enable_testing()
add_test(
    NAME sync_test
    COMMAND syncTest
)
M
Minghao Li 已提交
910 911