[Box Backup-commit] COMMIT r3500 - box/trunk/test/bbackupd

subversion at boxbackup.org subversion at boxbackup.org
Fri Dec 26 23:17:05 GMT 2014


Author: chris
Date: 2014-12-26 23:17:05 +0000 (Fri, 26 Dec 2014)
New Revision: 3500

Modified:
   box/trunk/test/bbackupd/testbbackupd.cpp
Log:
Fix compile errors in tests on Windows.

Modified: box/trunk/test/bbackupd/testbbackupd.cpp
===================================================================
--- box/trunk/test/bbackupd/testbbackupd.cpp	2014-12-26 23:17:02 UTC (rev 3499)
+++ box/trunk/test/bbackupd/testbbackupd.cpp	2014-12-26 23:17:05 UTC (rev 3500)
@@ -2576,7 +2576,7 @@
 		}
 
 		// Check that bbackupquery shows the dir in console encoding
-		command = BBACKUPQUERY " -Wwarning "
+		std::string command = BBACKUPQUERY " -Wwarning "
 			"-c testfiles/bbackupd.conf "
 			"-q \"list Test1\" quit";
 		pid_t bbackupquery_pid;
@@ -3627,21 +3627,21 @@
 	BOX_NOTICE("skipping test on this platform");
 	// requires openfile(), GetFileTime() and attrib.exe
 #else
-	bbackupd.RunSyncNow()
+	bbackupd.RunSyncNow();
 
 	// TODO FIXME dedent
 	{
 		// make one of the files read-only, expect a compare failure
-		compareReturnValue = ::system("attrib +r "
+		int exit_status = ::system("attrib +r "
 			"testfiles\\restore-Test1\\f1.dat");
-		TEST_RETURN(compareReturnValue, 0);
+		TEST_RETURN(exit_status, 0);
 
 		TEST_COMPARE(Compare_Different);
 	
 		// set it back, expect no failures
-		compareReturnValue = ::system("attrib -r "
+		exit_status = ::system("attrib -r "
 			"testfiles\\restore-Test1\\f1.dat");
-		TEST_RETURN(compareReturnValue, 0);
+		TEST_RETURN(exit_status, 0);
 
 		TEST_COMPARE(Compare_Same);
 
@@ -4051,7 +4051,8 @@
 		// Test that locked files cannot be backed up,
 		// and the appropriate error is reported.
 
-		handle = openfile("testfiles/TestDir1/f1.dat", O_LOCK);
+		HANDLE handle = openfile("testfiles/TestDir1/f1.dat",
+			O_LOCK, 0);
 		TEST_THAT_OR(handle != INVALID_HANDLE_VALUE, FAIL);
 
 		{




More information about the Boxbackup-commit mailing list