aboutsummaryrefslogtreecommitdiff
path: root/src/zennet-test/zennet-test.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-03-14 16:33:17 +0100
committerGitHub Enterprise <[email protected]>2024-03-14 16:33:17 +0100
commit45bfc721dd049193abf3b2be2aa7b097466ddbe9 (patch)
treeabb6cf119aa148972aabad730ed384c115177cf1 /src/zennet-test/zennet-test.cpp
parentchange code owners for Enterprise github user names (#7) (diff)
downloadzen-45bfc721dd049193abf3b2be2aa7b097466ddbe9.tar.xz
zen-45bfc721dd049193abf3b2be2aa7b097466ddbe9.zip
clean up test linking (#4)
- Improvement: Add zenhttp-test and zenutil-test - Improvement: Moved cachepolicy test to cachepolicy.cpp - Improvement: Renamed cachestore tests from z$ to cachestore - Improvement: Moved test linking so test for a lib is linked by <lib>-test - Improvement: Removed HttpRequestParseRelativeUri in httpstructuredcache.cpp and use the one in cacherequests.h instead
Diffstat (limited to 'src/zennet-test/zennet-test.cpp')
-rw-r--r--src/zennet-test/zennet-test.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/zennet-test/zennet-test.cpp b/src/zennet-test/zennet-test.cpp
index b133f246c..f7f54e6ad 100644
--- a/src/zennet-test/zennet-test.cpp
+++ b/src/zennet-test/zennet-test.cpp
@@ -1,49 +1,31 @@
// Copyright Epic Games, Inc. All Rights Reserved.
-#include "zennet-test.h"
-#include <zencore/fmtutils.h>
+#include <zencore/filesystem.h>
#include <zencore/logging.h>
-#include <zencore/timer.h>
#include <zennet/zennet.h>
-#include <zenutil/zenserverprocess.h>
#if ZEN_USE_MIMALLOC
ZEN_THIRD_PARTY_INCLUDES_START
-# include <mimalloc.h>
+# include <mimalloc-new-delete.h>
ZEN_THIRD_PARTY_INCLUDES_END
#endif
-//////////////////////////////////////////////////////////////////////////
-
#if ZEN_WITH_TESTS
# define ZEN_TEST_WITH_RUNNER 1
# include <zencore/testing.h>
#endif
-//////////////////////////////////////////////////////////////////////////
-
-using namespace std::literals;
-
-zen::ZenServerEnvironment TestEnv;
-
int
main([[maybe_unused]] int argc, [[maybe_unused]] char** argv)
{
#if ZEN_USE_MIMALLOC
mi_version();
#endif
-
#if ZEN_WITH_TESTS
zen::zennet_forcelinktests();
zen::logging::InitializeLogging();
-
- std::filesystem::path ProgramBaseDir = std::filesystem::path(argv[0]).parent_path();
- std::filesystem::path TestBaseDir = ProgramBaseDir.parent_path().parent_path() / ".test";
-
- TestEnv.InitializeForTest(ProgramBaseDir, TestBaseDir);
-
- ZEN_INFO("Running tests...(base dir: '{}')", TestBaseDir);
+ zen::MaximizeOpenFileCount();
return ZEN_RUN_TESTS(argc, argv);
#else