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

This commit is contained in:
Jan committed 2025-01-05 00:16:58 +00:00
1 parent fc9e6ce14d
commit ce3786f086
12 files changed
+151

No files matched your search

+27
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