summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2007-03-10 16:12:01 +0000
committerChris Wilson <chris+github@qwirx.com>2007-03-10 16:12:01 +0000
commit7ee217c02aa7265f3253781b1a4eece198fb6e3d (patch)
tree18075de1884bf33f0bf99c7f135f4419a3f67cb4 /test
parent61af1d8fe20580d59a760f53e63cc984861e7324 (diff)
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)
Diffstat (limited to 'test')
-rw-r--r--test/backupstore/testbackupstore.cpp1
-rw-r--r--test/backupstorefix/testbackupstorefix.cpp15
-rw-r--r--test/backupstorepatch/testbackupstorepatch.cpp1
-rw-r--r--test/basicserver/testbasicserver.cpp1
-rw-r--r--test/bbackupd/testbbackupd.cpp1
5 files changed, 5 insertions, 14 deletions
diff --git a/test/backupstore/testbackupstore.cpp b/test/backupstore/testbackupstore.cpp
index 840d004c..da66af60 100644
--- a/test/backupstore/testbackupstore.cpp
+++ b/test/backupstore/testbackupstore.cpp
@@ -33,6 +33,7 @@
#include "MemBlockStream.h"
#include "BackupClientFileAttributes.h"
#include "BackupClientCryptoKeys.h"
+#include "ServerControl.h"
#include "MemLeakFindOn.h"
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<int32_t, bool> 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)
{
diff --git a/test/backupstorepatch/testbackupstorepatch.cpp b/test/backupstorepatch/testbackupstorepatch.cpp
index b33e8e73..6b93a3aa 100644
--- a/test/backupstorepatch/testbackupstorepatch.cpp
+++ b/test/backupstorepatch/testbackupstorepatch.cpp
@@ -35,6 +35,7 @@
#include "MemBlockStream.h"
#include "BackupClientFileAttributes.h"
#include "BackupClientCryptoKeys.h"
+#include "ServerControl.h"
#include "MemLeakFindOn.h"
diff --git a/test/basicserver/testbasicserver.cpp b/test/basicserver/testbasicserver.cpp
index 3360cd20..c56e6a0b 100644
--- a/test/basicserver/testbasicserver.cpp
+++ b/test/basicserver/testbasicserver.cpp
@@ -28,6 +28,7 @@
#include "TestContext.h"
#include "autogen_TestProtocolClient.h"
#include "autogen_TestProtocolServer.h"
+#include "ServerControl.h"
#include "MemLeakFindOn.h"
diff --git a/test/bbackupd/testbbackupd.cpp b/test/bbackupd/testbbackupd.cpp
index ea96a220..a99783e8 100644
--- a/test/bbackupd/testbbackupd.cpp
+++ b/test/bbackupd/testbbackupd.cpp
@@ -51,6 +51,7 @@
#include "FileStream.h"
#include "IOStreamGetLine.h"
#include "intercept.h"
+#include "ServerControl.h"
#include "MemLeakFindOn.h"