Last active
January 13, 2022 17:31
-
-
Save bgogul/5d731bf62cff5fe4e53fccb71eb20aa8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace raksha::test_utils { | |
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); | |
} | |
} | |
GetTestDataDir("src/xform_to_datalog/testdata") | |
GetTestDataDir("src/some/other/target/") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment