[Box Backup-commit] COMMIT r1956 - box/chris/general/test/bbackupd

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Sat Dec 8 22:00:40 GMT 2007


Author: chris
Date: 2007-12-08 22:00:40 +0000 (Sat, 08 Dec 2007)
New Revision: 1956

Modified:
   box/chris/general/test/bbackupd/testbbackupd.cpp
Log:
Include the time taken by bbackupquery compare in the time between
syncs, used to check that the SyncAllowScript pauses backup for the
correct length of time. (merges [1913])


Modified: box/chris/general/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/chris/general/test/bbackupd/testbbackupd.cpp	2007-12-08 22:00:03 UTC (rev 1955)
+++ box/chris/general/test/bbackupd/testbbackupd.cpp	2007-12-08 22:00:40 UTC (rev 1956)
@@ -1529,6 +1529,10 @@
 			TEST_THAT(stat("testfiles" DIRECTORY_SEPARATOR 
 				"syncallowscript.notifyran.2", &st) == 0);
 
+			// bbackupquery compare might take a while
+			// on slow machines, so start the timer now
+			long start_time = time(NULL);
+
 			// check that no backup has run (compare fails)
 			compareReturnValue = ::system(BBACKUPQUERY " -q "
 				"-c testfiles/bbackupd.conf "
@@ -1537,7 +1541,6 @@
 			TEST_RETURN(compareReturnValue, 2);
 			TestRemoteProcessMemLeaks("bbackupquery.memleaks");
 
-			long start_time = time(NULL);
 			TEST_THAT(unlink(sync_control_file) == 0);
 			wait_for_sync_start();
 			long end_time = time(NULL);




More information about the Boxbackup-commit mailing list