[Box Backup-commit] COMMIT r931 - box/chris/merge/lib/common
subversion at fluffy.co.uk
subversion at fluffy.co.uk
Sat Sep 2 11:56:48 BST 2006
Author: chris
Date: 2006-09-02 11:56:48 +0100 (Sat, 02 Sep 2006)
New Revision: 931
Modified:
box/chris/merge/lib/common/Test.h
Log:
(refs #3)
Added a RunCommand() function which converts UNIX paths to native before
calling ::system() on Win32.
Modified: box/chris/merge/lib/common/Test.h
===================================================================
--- box/chris/merge/lib/common/Test.h 2006-09-02 10:51:41 UTC (rev 930)
+++ box/chris/merge/lib/common/Test.h 2006-09-02 10:56:48 UTC (rev 931)
@@ -79,7 +79,7 @@
return -1;
}
-inline int LaunchServer(const char *pCommandLine, const char *pidFile)
+inline int RunCommand(const char *pCommandLine)
{
#ifdef WIN32
// convert UNIX paths to native
@@ -101,7 +101,12 @@
std::string command = pCommandLine;
#endif
- if(::system(command.c_str()) != 0)
+ return ::system(command.c_str());
+}
+
+inline int LaunchServer(const char *pCommandLine, const char *pidFile)
+{
+ if(RunCommand(pCommandLine) != 0)
{
printf("Server: %s\n", command.c_str());
TEST_FAIL_WITH_MESSAGE("Couldn't start server");
More information about the Boxbackup-commit
mailing list