blob: 15e3c13a5bc99fcd677e4c312038ae7c3c101d85 [file] [log] [blame]
Austin Schuhc243b422020-10-11 15:35:08 -07001#include "aos/testing/tmpdir.h"
2
3#include <cstdlib>
4#include <string>
5
6namespace aos {
7namespace testing {
8
9std::string TestTmpDir() {
10 const char *tmp_dir = std::getenv("TEST_TMPDIR");
11 if (tmp_dir != nullptr) {
12 return tmp_dir;
13 }
14 return "/tmp";
15}
16
17} // namespace testing
18} // namespace aos