| 113 | } |
| 114 | |
| 115 | Result<std::string> GetTestResourceRoot() { |
| 116 | auto maybe_var = ::arrow::internal::GetEnvVar("ARROW_TEST_DATA"); |
| 117 | if (maybe_var.status().IsKeyError()) { |
| 118 | return Status::IOError( |
| 119 | "Test resources not found, set ARROW_TEST_DATA to <repo root>/testing/data"); |
| 120 | } |
| 121 | return maybe_var; |
| 122 | } |
| 123 | |
| 124 | Result<std::string> GetTestResourcePath(std::string subpath) { |
| 125 | ARROW_ASSIGN_OR_RAISE(auto root, GetTestResourceRoot()); |