Changeset 1908
- Timestamp:
- 04/11/2007 03:24:11 (5 years ago)
- Location:
- box/trunk
- Files:
-
- 2 edited
-
lib/common/Test.h (modified) (2 diffs)
-
test/bbackupd/testbbackupd.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/lib/common/Test.h
r1624 r1908 24 24 25 25 #include <string> 26 27 #ifdef WIN32 28 #define BBACKUPCTL "..\\..\\bin\\bbackupctl\\bbackupctl.exe" 29 #define BBACKUPD "..\\..\\bin\\bbackupd\\bbackupd.exe" 30 #define BBSTORED "..\\..\\bin\\bbstored\\bbstored.exe" 31 #define BBACKUPQUERY "..\\..\\bin\\bbackupquery\\bbackupquery.exe" 32 #define BBSTOREACCOUNTS "..\\..\\bin\\bbstoreaccounts\\bbstoreaccounts.exe" 33 #define TEST_RETURN(actual, expected) TEST_THAT(actual == expected); 34 #else 35 #define BBACKUPCTL "../../bin/bbackupctl/bbackupctl" 36 #define BBACKUPD "../../bin/bbackupd/bbackupd" 37 #define BBSTORED "../../bin/bbstored/bbstored" 38 #define BBACKUPQUERY "../../bin/bbackupquery/bbackupquery" 39 #define BBSTOREACCOUNTS "../../bin/bbstoreaccounts/bbstoreaccounts" 40 #define TEST_RETURN(actual, expected) TEST_THAT(actual == expected*256); 41 #endif 26 42 27 43 extern int failures; … … 354 370 } 355 371 356 #ifdef WIN32 357 #define BBACKUPCTL "..\\..\\bin\\bbackupctl\\bbackupctl.exe" 358 #define BBACKUPD "..\\..\\bin\\bbackupd\\bbackupd.exe" 359 #define BBSTORED "..\\..\\bin\\bbstored\\bbstored.exe" 360 #define BBACKUPQUERY "..\\..\\bin\\bbackupquery\\bbackupquery.exe" 361 #define BBSTOREACCOUNTS "..\\..\\bin\\bbstoreaccounts\\bbstoreaccounts.exe" 362 #define TEST_RETURN(actual, expected) TEST_THAT(actual == expected); 363 #else 364 #define BBACKUPCTL "../../bin/bbackupctl/bbackupctl" 365 #define BBACKUPD "../../bin/bbackupd/bbackupd" 366 #define BBSTORED "../../bin/bbstored/bbstored" 367 #define BBACKUPQUERY "../../bin/bbackupquery/bbackupquery" 368 #define BBSTOREACCOUNTS "../../bin/bbstoreaccounts/bbstoreaccounts" 369 #define TEST_RETURN(actual, expected) TEST_THAT(actual == expected*256); 370 #endif 372 inline void force_sync() 373 { 374 TEST_THAT(::system(BBACKUPCTL " -q -c testfiles/bbackupd.conf " 375 "force-sync") == 0); 376 TestRemoteProcessMemLeaks("bbackupctl.memleaks"); 377 } 378 379 inline void wait_for_sync_start() 380 { 381 TEST_THAT(::system(BBACKUPCTL " -q -c testfiles/bbackupd.conf " 382 "wait-for-sync") == 0); 383 TestRemoteProcessMemLeaks("bbackupctl.memleaks"); 384 } 385 386 inline void wait_for_sync_end() 387 { 388 TEST_THAT(::system(BBACKUPCTL " -q -c testfiles/bbackupd.conf " 389 "wait-for-end") == 0); 390 TestRemoteProcessMemLeaks("bbackupctl.memleaks"); 391 } 392 393 inline void sync_and_wait() 394 { 395 TEST_THAT(::system(BBACKUPCTL " -q -c testfiles/bbackupd.conf " 396 "force-sync") == 0); 397 TestRemoteProcessMemLeaks("bbackupctl.memleaks"); 398 } 371 399 372 400 inline void terminate_bbackupd(int pid) -
box/trunk/test/bbackupd/testbbackupd.cpp
r1867 r1908 543 543 } 544 544 } 545 #endif // !WIN32 546 547 void force_sync() 548 { 549 TEST_THAT(::system(BBACKUPCTL " -q -c testfiles/bbackupd.conf " 550 "force-sync") == 0); 551 TestRemoteProcessMemLeaks("bbackupctl.memleaks"); 552 } 553 554 void wait_for_sync_start() 555 { 556 TEST_THAT(::system(BBACKUPCTL " -q -c testfiles/bbackupd.conf " 557 "wait-for-sync") == 0); 558 TestRemoteProcessMemLeaks("bbackupctl.memleaks"); 559 } 560 561 void wait_for_sync_end() 562 { 563 TEST_THAT(::system(BBACKUPCTL " -q -c testfiles/bbackupd.conf " 564 "wait-for-end") == 0); 565 TestRemoteProcessMemLeaks("bbackupctl.memleaks"); 566 } 567 568 void sync_and_wait() 569 { 570 TEST_THAT(::system(BBACKUPCTL " -q -c testfiles/bbackupd.conf " 571 "force-sync") == 0); 572 TestRemoteProcessMemLeaks("bbackupctl.memleaks"); 573 } 574 575 #ifdef WIN32 545 576 546 bool set_file_time(const char* filename, FILETIME creationTime, 577 547 FILETIME lastModTime, FILETIME lastAccessTime)
Note: See TracChangeset
for help on using the changeset viewer.
