Changeset 2316 for box/trunk/test
- Timestamp:
- 03/10/2008 23:45:11 (4 years ago)
- Location:
- box/trunk/test/bbackupd
- Files:
-
- 2 edited
-
testbbackupd.cpp (modified) (9 diffs)
-
testfiles/bbackupd-temploc.conf (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
box/trunk/test/bbackupd/testbbackupd.cpp
r2291 r2316 1418 1418 // will see that the deleted files have been removed. 1419 1419 1420 #ifdef WIN32 1421 BOX_TRACE("Wait long enough that housekeeping " 1422 "will run again") 1423 wait_for_backup_operation(5); 1424 BOX_TRACE("done."); 1425 #endif 1420 #ifndef WIN32 1421 BOX_TRACE("Wait long enough that housekeeping " 1422 "will run again") 1423 wait_for_backup_operation(5); 1424 BOX_TRACE("done."); 1426 1425 1427 1426 BOX_TRACE("Find out whether bbackupd marked files as deleted"); … … 1496 1495 return 1; 1497 1496 } 1497 #endif 1498 1498 1499 1499 // Wait for housekeeping to run … … 1932 1932 1933 1933 printf("\n==== Testing that redundant locations are deleted on time\n"); 1934 1935 // unpack the files for the redundant location test 1936 TEST_THAT(::system("rm -rf testfiles/TestDir2") == 0); 1937 TEST_THAT(::mkdir("testfiles/TestDir2", 0777) == 0); 1938 1939 #ifdef WIN32 1940 TEST_THAT(::system("tar xzvf testfiles/spacetest1.tgz " 1941 "-C testfiles/TestDir2") == 0); 1942 #else 1943 TEST_THAT(::system("gzip -d < testfiles/spacetest1.tgz " 1944 "| ( cd testfiles/TestDir2 && tar xf - )") == 0); 1945 #endif 1934 1946 1935 1947 // BLOCK … … 3823 3835 // and the appropriate error is reported. 3824 3836 // Wait for the sync to finish, so that we have time to work 3825 wait_for_sync_ start();3837 wait_for_sync_end(); 3826 3838 // Now we have about three seconds to work 3827 3839 … … 3836 3848 TEST_THAT(!TestFileExists("testfiles/" 3837 3849 "notifyran.read-error.1")); 3838 3850 } 3851 3852 TEST_THAT(ServerIsAlive(bbackupd_pid)); 3853 TEST_THAT(ServerIsAlive(bbstored_pid)); 3854 if (!ServerIsAlive(bbackupd_pid)) return 1; 3855 if (!ServerIsAlive(bbstored_pid)) return 1; 3856 3857 if (handle != 0) 3858 { 3839 3859 // this sync should try to back up the file, 3840 3860 // and fail, because it's locked … … 3844 3864 TEST_THAT(!TestFileExists("testfiles/" 3845 3865 "notifyran.read-error.2")); 3846 3866 } 3867 3868 TEST_THAT(ServerIsAlive(bbackupd_pid)); 3869 TEST_THAT(ServerIsAlive(bbstored_pid)); 3870 if (!ServerIsAlive(bbackupd_pid)) return 1; 3871 if (!ServerIsAlive(bbstored_pid)) return 1; 3872 3873 if (handle != 0) 3874 { 3847 3875 // now close the file and check that it is 3848 3876 // backed up on the next run. … … 3853 3881 TEST_THAT(!TestFileExists("testfiles/" 3854 3882 "notifyran.read-error.2")); 3855 3883 } 3884 3885 TEST_THAT(ServerIsAlive(bbackupd_pid)); 3886 TEST_THAT(ServerIsAlive(bbstored_pid)); 3887 if (!ServerIsAlive(bbackupd_pid)) return 1; 3888 if (!ServerIsAlive(bbstored_pid)) return 1; 3889 3890 if (handle != 0) 3891 { 3856 3892 // compare, and check that it works 3857 3893 // reports the correct error message (and finishes) … … 3863 3899 BackupQueries::ReturnCode::Compare_Same); 3864 3900 TestRemoteProcessMemLeaks("bbackupquery.memleaks"); 3865 3901 } 3902 3903 TEST_THAT(ServerIsAlive(bbackupd_pid)); 3904 TEST_THAT(ServerIsAlive(bbstored_pid)); 3905 if (!ServerIsAlive(bbackupd_pid)) return 1; 3906 if (!ServerIsAlive(bbstored_pid)) return 1; 3907 3908 if (handle != 0) 3909 { 3866 3910 // open the file again, compare and check that compare 3867 3911 // reports the correct error message (and finishes) … … 3881 3925 // works again 3882 3926 CloseHandle(handle); 3883 3927 } 3928 3929 TEST_THAT(ServerIsAlive(bbackupd_pid)); 3930 TEST_THAT(ServerIsAlive(bbstored_pid)); 3931 if (!ServerIsAlive(bbackupd_pid)) return 1; 3932 if (!ServerIsAlive(bbstored_pid)) return 1; 3933 3934 if (handle != 0) 3935 { 3884 3936 compareReturnValue = ::system(BBACKUPQUERY " " 3885 3937 "-c testfiles/bbackupd.conf " -
box/trunk/test/bbackupd/testfiles/bbackupd-temploc.conf
r2127 r2316 50 50 Test2 51 51 { 52 Path = testfiles/TestDir 152 Path = testfiles/TestDir2 53 53 } 54 54 }
Note: See TracChangeset
for help on using the changeset viewer.
