summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-12-24 00:22:52 +0000
committerChris Wilson <chris+github@qwirx.com>2015-12-24 00:22:52 +0000
commitc8c02d3659e476fdf48aa5c15770caed413debad (patch)
tree687ca218428488d19fe2424399851841799e62fb /test
parentb90727839ce006bc275c0bb714e34efdacb84ae5 (diff)
Remove unix shell-isms from test/s3store, to make it work on Windows.
Diffstat (limited to 'test')
-rw-r--r--test/s3store/tests3store.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/s3store/tests3store.cpp b/test/s3store/tests3store.cpp
index aa596af4..50bd2bfd 100644
--- a/test/s3store/tests3store.cpp
+++ b/test/s3store/tests3store.cpp
@@ -23,6 +23,7 @@
#include "ServerControl.h"
#include "SSLLib.h"
#include "Test.h"
+#include "Utils.h"
#include "MemLeakFindOn.h"
@@ -48,10 +49,14 @@ bool StopSimulator()
bool kill_running_daemons()
{
- TEST_THAT_OR(::system("test ! -r testfiles/s3simulator.pid || "
- "kill `cat testfiles/s3simulator.pid`") == 0, FAIL);
- TEST_THAT_OR(::system("rm -f testfiles/s3simulator.pid") == 0, FAIL);
- return true;
+ if(FileExists("testfiles/s3simulator.pid"))
+ {
+ return KillServer("testfiles/s3simulator.pid", true);
+ }
+ else
+ {
+ return true;
+ }
}
//! Simplifies calling setUp() with the current function name in each test.