Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions src/common/utils/test/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@
namespace raksha::utils::test {

std::filesystem::path GetTestDataDir(std::string path) {
absl::string_view test_srcdir_env = std::getenv("TEST_SRCDIR");
absl::string_view test_workspace_env = std::getenv("TEST_WORKSPACE");
CHECK(test_srcdir_env != "");
CHECK(test_workspace_env != "");
return std::filesystem::path(test_srcdir_env) /
std::filesystem::path(test_workspace_env) /
std::move(path);
absl::string_view test_srcdir_env =
absl::NullSafeStringView(std::getenv("TEST_SRCDIR"));
absl::string_view test_workspace_env =
absl::NullSafeStringView(std::getenv("TEST_WORKSPACE"));
CHECK(test_srcdir_env != "");
CHECK(test_workspace_env != "");
return std::filesystem::path(test_srcdir_env) /
std::filesystem::path(test_workspace_env) / std::move(path);
}

std::vector<std::string> ReadFileLines(const std::filesystem::path& file) {
Expand Down