[Box Backup-commit] COMMIT r1611 - box/chris/merge/test/bbackupd

boxbackup-dev@fluffy.co.uk boxbackup-dev@fluffy.co.uk
Sat, 28 Apr 2007 23:51:12 +0100


Author: chris
Date: 2007-04-28 23:51:12 +0100 (Sat, 28 Apr 2007)
New Revision: 1611

Modified:
   box/chris/merge/test/bbackupd/testbbackupd.cpp
Log:
Use helper function rather than calling bbackupctl directly. (refs #3)


Modified: box/chris/merge/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/chris/merge/test/bbackupd/testbbackupd.cpp	2007-04-28 22:46:30 UTC (rev 1610)
+++ box/chris/merge/test/bbackupd/testbbackupd.cpp	2007-04-28 22:51:12 UTC (rev 1611)
@@ -2113,9 +2113,10 @@
 		printf("\n==== Continuously update file, "
 			"check isn't uploaded\n");
 		
-		// Make sure everything happens at the same point in the sync cycle: wait until exactly the start of a sync
-		TEST_THAT(::system("../../bin/bbackupctl/bbackupctl -c testfiles/bbackupd.conf wait-for-sync") == 0);
-		TestRemoteProcessMemLeaks("bbackupctl.memleaks");
+		// Make sure everything happens at the same point in the 
+		// sync cycle: wait until exactly the start of a sync
+		wait_for_sync_start();
+
 		// Then wait a second, to make sure the scan is complete
 		::safe_sleep(1);
 
@@ -2398,10 +2399,11 @@
 		printf("\n==== Create a file with timestamp way ahead "
 			"in the future\n");
 		// Time critical, so sync
-		TEST_THAT(::system("../../bin/bbackupctl/bbackupctl -q -c testfiles/bbackupd.conf wait-for-sync") == 0);
-		TestRemoteProcessMemLeaks("bbackupctl.memleaks");
+		wait_for_sync_start();
+
 		// Then wait a second, to make sure the scan is complete
 		::safe_sleep(1);
+
 		// Then modify an existing file
 		{
 			FILE *f = fopen("testfiles/TestDir1/sub23/in-the-future", "w");