diff options
author | Chris Wilson <chris+github@qwirx.com> | 2015-12-24 00:21:50 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2015-12-24 00:21:50 +0000 |
commit | b90727839ce006bc275c0bb714e34efdacb84ae5 (patch) | |
tree | 8712626b0b358b59bfdc7a77c16a3b85774c6430 | |
parent | 37ebab492d14d38403ba866cc9ab25a2204f92fd (diff) |
Fix test/httpserver startup on Windows (compiled with MSVC).
Avoid using the rm command, and use the correct name for the test executables
compiled by our cmake alternate build system.
-rw-r--r-- | test/httpserver/testhttpserver.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/httpserver/testhttpserver.cpp b/test/httpserver/testhttpserver.cpp index 17af1905..b188a648 100644 --- a/test/httpserver/testhttpserver.cpp +++ b/test/httpserver/testhttpserver.cpp @@ -36,6 +36,12 @@ #define SHORT_TIMEOUT 5000 +#ifdef _MSC_VER +# define TEST_EXECUTABLE "test_httpserver.exe" +#else +# define TEST_EXECUTABLE "./_test" +#endif + class TestWebServer : public HTTPServer { public: @@ -144,10 +150,12 @@ int test(int argc, const char *argv[]) return server.Main("doesnotexist", argc - 1, argv + 1); } +#ifndef WIN32 TEST_THAT(system("rm -rf *.memleaks") == 0); +#endif // Start the server - int pid = StartDaemon(0, "./_test server testfiles/httpserver.conf", + int pid = StartDaemon(0, TEST_EXECUTABLE " server testfiles/httpserver.conf", "testfiles/httpserver.pid"); TEST_THAT_OR(pid > 0, return 1); @@ -379,7 +387,7 @@ int test(int argc, const char *argv[]) } // Start the S3Simulator server - pid = StartDaemon(0, "./_test s3server testfiles/s3simulator.conf", + pid = StartDaemon(0, TEST_EXECUTABLE " s3server testfiles/s3simulator.conf", "testfiles/s3simulator.pid"); TEST_THAT_OR(pid > 0, return 1); |