1#ifndef HALIDE_TEST_DIRS_H
2#define HALIDE_TEST_DIRS_H
31 if (getenv_s(&read, buf, name) != 0) read = 0;
33 return std::string(buf);
38 return std::string(buf);
50 DWORD ret = GetCurrentDirectoryA(MAX_PATH, p);
57 char *p = getcwd(
nullptr, 0);
83 bool is_absolute = dir.size() >= 1 && dir[0] ==
'/';
87 if (dir.size() >= 3 && dir[1] ==
':' && (dir[2] ==
'\\' || dir[2] ==
'/')) {
93 assert(
false &&
"get_test_tmp_dir() is not an absolute path");
94 return "/unlikely_path/";
96 if (dir[dir.size() - 1] != sep) {
std::string get_env_variable(const char *name)
std::string get_current_directory()
std::string get_test_tmp_dir()
Return the path to a directory that can be safely written to when running tests; the contents directo...
This file defines the class FunctionDAG, which is our representation of a Halide pipeline,...
@ Internal
Not visible externally, similar to 'static' linkage in C.
char * getenv(const char *)