chore: check exact paths of test executable and provide temp dir

This commit is contained in:
Jan
2025-01-05 00:13:46 +00:00
parent fc9e6ce14d
commit ce3786f086
12 changed files with 151 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#include "OatTestPaths.h"
#include <filesystem>
namespace fs = std::filesystem;
namespace oat::paths
{
std::filesystem::path GetSourceDirectory()
{
return fs::current_path() / "src";
}
std::filesystem::path GetTestDirectory()
{
return fs::current_path() / "test";
}
std::filesystem::path GetTempDirectory()
{
auto result = fs::current_path() / "build" / ".tmp";
if (!fs::is_directory(result))
fs::create_directories(result);
return result;
}
} // namespace oat::paths