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


target_sources(syncTest
    PRIVATE
    "syncTest.cpp"
)
target_sources(syncEnvTest
    PRIVATE
    "syncEnvTest.cpp"
)
M
Minghao Li 已提交
61
target_sources(syncPingTimerTest
M
Minghao Li 已提交
62
    PRIVATE
M
Minghao Li 已提交
63
    "syncPingTimerTest.cpp"
M
Minghao Li 已提交
64
)
M
sync io  
Minghao Li 已提交
65
target_sources(syncIOTickQTest
M
sync io  
Minghao Li 已提交
66
    PRIVATE
M
sync io  
Minghao Li 已提交
67
    "syncIOTickQTest.cpp"
M
sync io  
Minghao Li 已提交
68
)
M
sync io  
Minghao Li 已提交
69
target_sources(syncIOTickPingTest
M
sync io  
Minghao Li 已提交
70
    PRIVATE
M
sync io  
Minghao Li 已提交
71
    "syncIOTickPingTest.cpp"
M
sync io  
Minghao Li 已提交
72
)
M
sync io  
Minghao Li 已提交
73 74 75 76
target_sources(syncIOSendMsgTest
    PRIVATE
    "syncIOSendMsgTest.cpp"
)
M
Minghao Li 已提交
77
target_sources(syncIOClientTest
M
sync io  
Minghao Li 已提交
78
    PRIVATE
M
Minghao Li 已提交
79
    "syncIOClientTest.cpp"
M
sync io  
Minghao Li 已提交
80
)
M
Minghao Li 已提交
81
target_sources(syncIOServerTest
M
sync io  
Minghao Li 已提交
82
    PRIVATE
M
Minghao Li 已提交
83
    "syncIOServerTest.cpp"
M
sync io  
Minghao Li 已提交
84
)
M
Minghao Li 已提交
85 86 87 88
target_sources(syncRaftStoreTest
    PRIVATE
    "syncRaftStoreTest.cpp"
)
M
Minghao Li 已提交
89 90 91 92
target_sources(syncEnqTest
    PRIVATE
    "syncEnqTest.cpp"
)
M
Minghao Li 已提交
93 94 95 96
target_sources(syncIndexTest
    PRIVATE
    "syncIndexTest.cpp"
)
M
Minghao Li 已提交
97 98 99 100
target_sources(syncInitTest
    PRIVATE
    "syncInitTest.cpp"
)
M
Minghao Li 已提交
101 102 103 104
target_sources(syncUtilTest
    PRIVATE
    "syncUtilTest.cpp"
)
M
Minghao Li 已提交
105 106 107 108
target_sources(syncVotesGrantedTest
    PRIVATE
    "syncVotesGrantedTest.cpp"
)
M
Minghao Li 已提交
109 110 111 112
target_sources(syncVotesRespondTest
    PRIVATE
    "syncVotesRespondTest.cpp"
)
M
Minghao Li 已提交
113 114 115 116
target_sources(syncIndexMgrTest
    PRIVATE
    "syncIndexMgrTest.cpp"
)
M
Minghao Li 已提交
117 118 119 120
target_sources(syncLogStoreTest
    PRIVATE
    "syncLogStoreTest.cpp"
)
M
Minghao Li 已提交
121 122 123 124
target_sources(syncEntryTest
    PRIVATE
    "syncEntryTest.cpp"
)
M
Minghao Li 已提交
125
target_sources(syncRequestVoteTest
M
Minghao Li 已提交
126
    PRIVATE
M
Minghao Li 已提交
127
    "syncRequestVoteTest.cpp"
M
Minghao Li 已提交
128
)
M
Minghao Li 已提交
129
target_sources(syncRequestVoteReplyTest
M
Minghao Li 已提交
130
    PRIVATE
M
Minghao Li 已提交
131 132 133 134 135 136 137 138 139
    "syncRequestVoteReplyTest.cpp"
)
target_sources(syncAppendEntriesTest
    PRIVATE
    "syncAppendEntriesTest.cpp"
)
target_sources(syncAppendEntriesReplyTest
    PRIVATE
    "syncAppendEntriesReplyTest.cpp"
M
Minghao Li 已提交
140
)
M
Minghao Li 已提交
141 142 143 144 145 146 147 148
target_sources(syncClientRequestTest
    PRIVATE
    "syncClientRequestTest.cpp"
)
target_sources(syncTimeoutTest
    PRIVATE
    "syncTimeoutTest.cpp"
)
M
Minghao Li 已提交
149 150 151 152 153 154 155 156
target_sources(syncPingTest
    PRIVATE
    "syncPingTest.cpp"
)
target_sources(syncPingReplyTest
    PRIVATE
    "syncPingReplyTest.cpp"
)
M
Minghao Li 已提交
157 158 159 160
target_sources(syncRpcMsgTest
    PRIVATE
    "syncRpcMsgTest.cpp"
)
M
Minghao Li 已提交
161 162 163 164 165 166 167 168
target_sources(syncPingTimerTest2
    PRIVATE
    "syncPingTimerTest2.cpp"
)
target_sources(syncPingSelfTest
    PRIVATE
    "syncPingSelfTest.cpp"
)
M
Minghao Li 已提交
169 170 171 172
target_sources(syncElectTest
    PRIVATE
    "syncElectTest.cpp"
)
M
Minghao Li 已提交
173 174 175 176
target_sources(syncEncodeTest
    PRIVATE
    "syncEncodeTest.cpp"
)
M
Minghao Li 已提交
177 178 179 180
target_sources(syncWriteTest
    PRIVATE
    "syncWriteTest.cpp"
)
M
Minghao Li 已提交
181 182 183 184
target_sources(syncReplicateTest
    PRIVATE
    "syncReplicateTest.cpp"
)
M
Minghao Li 已提交
185 186 187 188
target_sources(syncRefTest
    PRIVATE
    "syncRefTest.cpp"
)
M
Minghao Li 已提交
189 190 191 192
target_sources(syncLogStoreCheck
    PRIVATE
    "syncLogStoreCheck.cpp"
)
M
Minghao Li 已提交
193 194 195 196 197 198 199 200
target_sources(syncRaftCfgTest
    PRIVATE
    "syncRaftCfgTest.cpp"
)
target_sources(syncRespMgrTest
    PRIVATE
    "syncRespMgrTest.cpp"
)
M
Minghao Li 已提交
201 202 203 204
target_sources(syncSnapshotTest
    PRIVATE
    "syncSnapshotTest.cpp"
)
M
Minghao Li 已提交
205 206 207 208
target_sources(syncApplyMsgTest
    PRIVATE
    "syncApplyMsgTest.cpp"
)
M
Minghao Li 已提交
209 210 211 212
target_sources(syncConfigChangeTest
    PRIVATE
    "syncConfigChangeTest.cpp"
)
M
Minghao Li 已提交
213 214 215 216
target_sources(syncConfigChangeSnapshotTest
    PRIVATE
    "syncConfigChangeSnapshotTest.cpp"
)
217 218 219 220
target_sources(syncSnapshotSendTest
    PRIVATE
    "syncSnapshotSendTest.cpp"
)
221 222 223 224
target_sources(syncSnapshotRspTest
    PRIVATE
    "syncSnapshotRspTest.cpp"
)
M
Minghao Li 已提交
225 226 227 228 229 230 231 232
target_sources(syncSnapshotSenderTest
    PRIVATE
    "syncSnapshotSenderTest.cpp"
)
target_sources(syncSnapshotReceiverTest
    PRIVATE
    "syncSnapshotReceiverTest.cpp"
)
M
Minghao Li 已提交
233 234 235 236
target_sources(syncTestTool
    PRIVATE
    "syncTestTool.cpp"
)
M
Minghao Li 已提交
237 238 239 240 241 242 243 244 245 246 247 248
target_sources(syncRaftLogTest
    PRIVATE
    "syncRaftLogTest.cpp"
)
target_sources(syncRaftLogTest2
    PRIVATE
    "syncRaftLogTest2.cpp"
)
target_sources(syncRaftLogTest3
    PRIVATE
    "syncRaftLogTest3.cpp"
)
249 250 251 252
target_sources(syncLeaderTransferTest
    PRIVATE
    "syncLeaderTransferTest.cpp"
)
M
Minghao Li 已提交
253 254 255 256


target_include_directories(syncTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
257
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
258 259 260 261
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncEnvTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
262
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
263 264
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
265
target_include_directories(syncPingTimerTest
M
Minghao Li 已提交
266
    PUBLIC
wafwerar's avatar
wafwerar 已提交
267
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
268 269
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
sync io  
Minghao Li 已提交
270
target_include_directories(syncIOTickQTest
M
sync io  
Minghao Li 已提交
271
    PUBLIC
wafwerar's avatar
wafwerar 已提交
272
    "${TD_SOURCE_DIR}/include/libs/sync"
M
sync io  
Minghao Li 已提交
273 274
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
sync io  
Minghao Li 已提交
275
target_include_directories(syncIOTickPingTest
M
sync io  
Minghao Li 已提交
276
    PUBLIC
wafwerar's avatar
wafwerar 已提交
277
    "${TD_SOURCE_DIR}/include/libs/sync"
M
sync io  
Minghao Li 已提交
278 279
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
sync io  
Minghao Li 已提交
280 281
target_include_directories(syncIOSendMsgTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
282
    "${TD_SOURCE_DIR}/include/libs/sync"
M
sync io  
Minghao Li 已提交
283 284
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
285
target_include_directories(syncIOClientTest
M
sync io  
Minghao Li 已提交
286
    PUBLIC
wafwerar's avatar
wafwerar 已提交
287
    "${TD_SOURCE_DIR}/include/libs/sync"
M
sync io  
Minghao Li 已提交
288 289
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
290
target_include_directories(syncIOServerTest
M
sync io  
Minghao Li 已提交
291
    PUBLIC
wafwerar's avatar
wafwerar 已提交
292
    "${TD_SOURCE_DIR}/include/libs/sync"
M
sync io  
Minghao Li 已提交
293 294
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
295 296
target_include_directories(syncRaftStoreTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
297
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
298 299
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
300 301
target_include_directories(syncEnqTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
302
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
303 304
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
305 306
target_include_directories(syncIndexTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
307
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
308 309
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
310 311
target_include_directories(syncInitTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
312
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
313 314
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
315 316
target_include_directories(syncUtilTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
317
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
318 319
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
320 321
target_include_directories(syncVotesGrantedTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
322
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
323 324
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
325 326
target_include_directories(syncVotesRespondTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
327
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
328 329
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
330 331
target_include_directories(syncIndexMgrTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
332
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
333 334
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
335 336
target_include_directories(syncLogStoreTest
    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 341
target_include_directories(syncEntryTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
342
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
343 344
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
345 346
target_include_directories(syncRequestVoteTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
347
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
348 349 350 351
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncRequestVoteReplyTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
352
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
353 354 355
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncAppendEntriesTest
M
Minghao Li 已提交
356
    PUBLIC
wafwerar's avatar
wafwerar 已提交
357
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
358 359
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
360
target_include_directories(syncAppendEntriesReplyTest
M
Minghao Li 已提交
361
    PUBLIC
wafwerar's avatar
wafwerar 已提交
362
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
363 364
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
365 366
target_include_directories(syncClientRequestTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
367
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
368 369 370 371
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncTimeoutTest
    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(syncPingTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
377
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
378 379 380 381
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncPingReplyTest
    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(syncRpcMsgTest
    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(syncPingTimerTest2
    PUBLIC
wafwerar's avatar
wafwerar 已提交
392
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
393 394 395 396
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncPingSelfTest
    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(syncElectTest
    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(syncEncodeTest
    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(syncWriteTest
    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(syncReplicateTest
    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
target_include_directories(syncRefTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
422
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
423 424
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
425 426
target_include_directories(syncLogStoreCheck
    PUBLIC
wafwerar's avatar
wafwerar 已提交
427
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
428 429 430 431
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
target_include_directories(syncRaftCfgTest
    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(syncRespMgrTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
437
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
438 439
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
440 441
target_include_directories(syncSnapshotTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
442
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
443 444
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
445 446
target_include_directories(syncApplyMsgTest
    PUBLIC
wafwerar's avatar
wafwerar 已提交
447
    "${TD_SOURCE_DIR}/include/libs/sync"
M
Minghao Li 已提交
448 449
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
450 451 452 453 454
target_include_directories(syncConfigChangeTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
455 456 457 458 459
target_include_directories(syncConfigChangeSnapshotTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
460 461 462 463 464
target_include_directories(syncSnapshotSendTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
465 466 467 468 469
target_include_directories(syncSnapshotRspTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
470 471 472 473 474 475 476 477 478 479
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 已提交
480 481 482 483 484
target_include_directories(syncTestTool
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
485 486 487 488 489 490 491 492 493 494 495 496 497 498 499
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"
)
500 501 502 503 504
target_include_directories(syncLeaderTransferTest
    PUBLIC
    "${TD_SOURCE_DIR}/include/libs/sync"
    "${CMAKE_CURRENT_SOURCE_DIR}/../inc"
)
M
Minghao Li 已提交
505 506 507 508 509 510 511 512 513 514


target_link_libraries(syncTest
    sync
    gtest_main
)
target_link_libraries(syncEnvTest
    sync
    gtest_main
)
M
Minghao Li 已提交
515
target_link_libraries(syncPingTimerTest
M
Minghao Li 已提交
516 517 518
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
519
target_link_libraries(syncIOTickQTest
M
sync io  
Minghao Li 已提交
520 521 522
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
523
target_link_libraries(syncIOTickPingTest
M
sync io  
Minghao Li 已提交
524 525 526
    sync
    gtest_main
)
M
sync io  
Minghao Li 已提交
527 528 529 530
target_link_libraries(syncIOSendMsgTest
    sync
    gtest_main
)
M
Minghao Li 已提交
531
target_link_libraries(syncIOClientTest
M
sync io  
Minghao Li 已提交
532 533 534
    sync
    gtest_main
)
M
Minghao Li 已提交
535
target_link_libraries(syncIOServerTest
M
sync io  
Minghao Li 已提交
536 537 538
    sync
    gtest_main
)
M
Minghao Li 已提交
539 540 541 542
target_link_libraries(syncRaftStoreTest
    sync
    gtest_main
)
M
Minghao Li 已提交
543 544 545 546
target_link_libraries(syncEnqTest
    sync
    gtest_main
)
M
Minghao Li 已提交
547 548 549 550
target_link_libraries(syncIndexTest
    sync
    gtest_main
)
M
Minghao Li 已提交
551 552 553 554
target_link_libraries(syncInitTest
    sync
    gtest_main
)
M
Minghao Li 已提交
555 556 557 558
target_link_libraries(syncUtilTest
    sync
    gtest_main
)
M
Minghao Li 已提交
559 560 561 562
target_link_libraries(syncVotesGrantedTest
    sync
    gtest_main
)
M
Minghao Li 已提交
563 564 565 566
target_link_libraries(syncVotesRespondTest
    sync
    gtest_main
)
M
Minghao Li 已提交
567 568 569 570
target_link_libraries(syncIndexMgrTest
    sync
    gtest_main
)
M
Minghao Li 已提交
571 572 573 574
target_link_libraries(syncLogStoreTest
    sync
    gtest_main
)
M
Minghao Li 已提交
575 576 577 578
target_link_libraries(syncEntryTest
    sync
    gtest_main
)
M
Minghao Li 已提交
579 580 581 582 583 584 585 586 587
target_link_libraries(syncRequestVoteTest
    sync
    gtest_main
)
target_link_libraries(syncRequestVoteReplyTest
    sync
    gtest_main
)
target_link_libraries(syncAppendEntriesTest
M
Minghao Li 已提交
588 589 590
    sync
    gtest_main
)
M
Minghao Li 已提交
591
target_link_libraries(syncAppendEntriesReplyTest
M
Minghao Li 已提交
592 593 594
    sync
    gtest_main
)
M
Minghao Li 已提交
595 596 597 598 599 600 601 602
target_link_libraries(syncClientRequestTest
    sync
    gtest_main
)
target_link_libraries(syncTimeoutTest
    sync
    gtest_main
)
M
Minghao Li 已提交
603 604 605 606 607 608 609 610
target_link_libraries(syncPingTest
    sync
    gtest_main
)
target_link_libraries(syncPingReplyTest
    sync
    gtest_main
)
M
Minghao Li 已提交
611 612 613 614
target_link_libraries(syncRpcMsgTest
    sync
    gtest_main
)
M
Minghao Li 已提交
615 616 617 618 619 620 621 622
target_link_libraries(syncPingTimerTest2
    sync
    gtest_main
)
target_link_libraries(syncPingSelfTest
    sync
    gtest_main
)
M
Minghao Li 已提交
623 624 625 626
target_link_libraries(syncElectTest
    sync
    gtest_main
)
M
Minghao Li 已提交
627 628 629 630
target_link_libraries(syncEncodeTest
    sync
    gtest_main
)
M
Minghao Li 已提交
631 632 633 634
target_link_libraries(syncWriteTest
    sync
    gtest_main
)
M
Minghao Li 已提交
635 636 637 638
target_link_libraries(syncReplicateTest
    sync
    gtest_main
)
M
Minghao Li 已提交
639 640 641 642
target_link_libraries(syncRefTest
    sync
    gtest_main
)
M
Minghao Li 已提交
643 644 645 646
target_link_libraries(syncLogStoreCheck
    sync
    gtest_main
)
M
Minghao Li 已提交
647 648 649 650 651 652 653 654
target_link_libraries(syncRaftCfgTest
    sync
    gtest_main
)
target_link_libraries(syncRespMgrTest
    sync
    gtest_main
)
M
Minghao Li 已提交
655 656 657 658
target_link_libraries(syncSnapshotTest
    sync
    gtest_main
)
M
Minghao Li 已提交
659 660 661 662
target_link_libraries(syncApplyMsgTest
    sync
    gtest_main
)
M
Minghao Li 已提交
663 664 665 666
target_link_libraries(syncConfigChangeTest
    sync
    gtest_main
)
M
Minghao Li 已提交
667 668 669 670
target_link_libraries(syncConfigChangeSnapshotTest
    sync
    gtest_main
)
671 672 673 674
target_link_libraries(syncSnapshotSendTest
    sync
    gtest_main
)
675 676 677 678
target_link_libraries(syncSnapshotRspTest
    sync
    gtest_main
)
M
Minghao Li 已提交
679 680 681 682 683 684 685 686
target_link_libraries(syncSnapshotSenderTest
    sync
    gtest_main
)
target_link_libraries(syncSnapshotReceiverTest
    sync
    gtest_main
)
M
Minghao Li 已提交
687 688 689 690
target_link_libraries(syncTestTool
    sync
    gtest_main
)
M
Minghao Li 已提交
691 692 693 694 695 696 697 698 699 700 701 702
target_link_libraries(syncRaftLogTest
    sync
    gtest_main
)
target_link_libraries(syncRaftLogTest2
    sync
    gtest_main
)
target_link_libraries(syncRaftLogTest3
    sync
    gtest_main
)
703 704 705 706
target_link_libraries(syncLeaderTransferTest
    sync
    gtest_main
)
M
Minghao Li 已提交
707 708 709 710 711 712 713


enable_testing()
add_test(
    NAME sync_test
    COMMAND syncTest
)
M
Minghao Li 已提交
714 715