MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetTestDirectory

Method GetTestDirectory

src/leveldb/util/env_posix.cc:685–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683 }
684
685 Status GetTestDirectory(std::string* result) override {
686 const char* env = std::getenv("TEST_TMPDIR");
687 if (env && env[0] != '\0') {
688 *result = env;
689 } else {
690 char buf[100];
691 std::snprintf(buf, sizeof(buf), "/tmp/leveldbtest-%d",
692 static_cast<int>(::geteuid()));
693 *result = buf;
694 }
695
696 // The CreateDir status is ignored because the directory may already exist.
697 CreateDir(*result);
698
699 return Status::OK();
700 }
701
702 Status NewLogger(const std::string& filename, Logger** result) override {
703 int fd = ::open(filename.c_str(),

Callers 13

GetTestDirectoryFunction · 0.45
BenchmarkMethod · 0.45
OpenMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
BenchmarkMethod · 0.45
OpenMethod · 0.45
mainFunction · 0.45
TmpDirFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 2

CreateDirFunction · 0.85
OKFunction · 0.85

Tested by 4

TmpDirFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36