aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver-test/zenserver-test.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2023-11-21 14:52:56 +0100
committerGitHub <[email protected]>2023-11-21 14:52:56 +0100
commit8e1cb139d817880c557d407c363eb838c0893f5a (patch)
tree69da94b1df3f2fd1d19e623084c88543c0ce85f6 /src/zenserver-test/zenserver-test.cpp
parentbasic ZEN_ASSERT_FORMAT implementation (#556) (diff)
downloadzen-8e1cb139d817880c557d407c363eb838c0893f5a.tar.xz
zen-8e1cb139d817880c557d407c363eb838c0893f5a.zip
zen run command (#552)
initial version -- this is primarily intended to be used for running stress tests and/or benchmarks example usage: `zen run -n 10 -- zenserver-test` `zen run -n 10 -- zenserver-test --ts=core.assert` run zenserver-test 10 times (testing only the `core.assert` test suite) `zen run --time 600 --basepath=d:\test_dir\test1 -- zenserver-test` keeps spawning new instances for 10 minutes (600 seconds)
Diffstat (limited to 'src/zenserver-test/zenserver-test.cpp')
-rw-r--r--src/zenserver-test/zenserver-test.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/zenserver-test/zenserver-test.cpp b/src/zenserver-test/zenserver-test.cpp
index 3cf6e2976..3efa57fdb 100644
--- a/src/zenserver-test/zenserver-test.cpp
+++ b/src/zenserver-test/zenserver-test.cpp
@@ -101,22 +101,23 @@ int
main(int argc, char** argv)
{
using namespace std::literals;
+ using namespace zen;
# if ZEN_USE_MIMALLOC
mi_version();
# endif
- zen::zencore_forcelinktests();
- zen::zenhttp_forcelinktests();
- zen::cacherequests_forcelink();
+ zencore_forcelinktests();
+ zenhttp_forcelinktests();
+ cacherequests_forcelink();
zen::logging::InitializeLogging();
zen::logging::SetLogLevel(zen::logging::level::Debug);
spdlog::set_formatter(std::make_unique<zen::logging::full_test_formatter>("test", std::chrono::system_clock::now()));
- std::filesystem::path ProgramBaseDir = std::filesystem::path(argv[0]).parent_path();
- std::filesystem::path TestBaseDir = ProgramBaseDir.parent_path().parent_path() / ".test";
+ std::filesystem::path ProgramBaseDir = GetRunningExecutablePath().parent_path();
+ std::filesystem::path TestBaseDir = std::filesystem::current_path() / ".test";
// This is pretty janky because we're passing most of the options through to the test
// framework, so we can't just use cxxopts (I think). This should ideally be cleaned up