aboutsummaryrefslogtreecommitdiff
path: root/zentestutil/zenserverprocess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zentestutil/zenserverprocess.cpp')
-rw-r--r--zentestutil/zenserverprocess.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/zentestutil/zenserverprocess.cpp b/zentestutil/zenserverprocess.cpp
index 9d62d692f..04314bc5f 100644
--- a/zentestutil/zenserverprocess.cpp
+++ b/zentestutil/zenserverprocess.cpp
@@ -26,7 +26,8 @@ ZenTestEnvironment::Initialize(std::filesystem::path ProgramBaseDir, std::filesy
m_ProgramBaseDir = ProgramBaseDir;
m_TestBaseDir = TestBaseDir;
- spdlog::info("Cleaning '{}'", TestBaseDir);
+ spdlog::info("Program base dir is '{}'", ProgramBaseDir);
+ spdlog::info("Cleaning test base dir '{}'", TestBaseDir);
zen::DeleteDirectories(TestBaseDir.c_str());
m_IsInitialized = true;
@@ -42,11 +43,23 @@ ZenTestEnvironment::CreateNewTestDir()
std::filesystem::path TestPath = m_TestBaseDir / TestDir.c_str();
+ spdlog::info("Creating new test dir @ '{}'", TestPath);
+
zen::CreateDirectories(TestPath.c_str());
return TestPath;
}
+std::filesystem::path
+ZenTestEnvironment::RootDir(std::string_view Path)
+{
+ std::filesystem::path Root = m_ProgramBaseDir.parent_path().parent_path();
+
+ std::filesystem::path Relative { Path };
+
+ return Root / Relative;
+}
+
//////////////////////////////////////////////////////////////////////////
std::atomic<int> ChildIdCounter{0};