From 7ee217c02aa7265f3253781b1a4eece198fb6e3d Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 10 Mar 2007 16:12:01 +0000 Subject: Moved SendCommands(), HUPServer(), KillServer() to lib/server/ServerCommands.h. All of these use lib/server/WinNamedPipeStream on Win32, so they don't belong in lib/common. Made LaunchServer() work on Win32. Added constants for paths to executables, for use in tests, removing the need for #ifdefs and clumsy DIRECTORY_SEPARATORs in paths. Added terminate_bbackupd() and wait_for_operation() functions. Update unit tests to #include "ServerControl.h" if they need it. (refs #3) --- test/backupstorefix/testbackupstorefix.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'test/backupstorefix') diff --git a/test/backupstorefix/testbackupstorefix.cpp b/test/backupstorefix/testbackupstorefix.cpp index 0349b039..dd8251c5 100644 --- a/test/backupstorefix/testbackupstorefix.cpp +++ b/test/backupstorefix/testbackupstorefix.cpp @@ -29,6 +29,7 @@ #include "RaidFileException.h" #include "StoreStructure.h" #include "BackupStoreFileWire.h" +#include "ServerControl.h" #include "MemLeakFindOn.h" @@ -68,20 +69,6 @@ std::map objectIsDir; ::system("../../bin/bbstoreaccounts/bbstoreaccounts -c testfiles/bbstored.conf check 01234567"); \ ::system("../../bin/bbstoreaccounts/bbstoreaccounts -c testfiles/bbstored.conf check 01234567 fix"); -// Wait a given number of seconds for something to complete -void wait_for_operation(int seconds) -{ - printf("waiting: "); - fflush(stdout); - for(int l = 0; l < seconds; ++l) - { - sleep(1); - printf("."); - fflush(stdout); - } - printf("\n"); -} - // Get ID of an object given a filename int32_t getID(const char *name) { -- cgit v1.2.3