Lines Matching defs:TempDir
138 llvm::SmallString<256> TempDir;
139 ASSERT_THAT(llvm::sys::fs::createUniqueDirectory("ClangPathResolve", TempDir),
142 ASSERT_THAT(llvm::sys::fs::real_path(TempDir.str(), TempDir), ok());
144 [&] { llvm::sys::fs::remove_directories(TempDir); });
145 ASSERT_THAT(llvm::sys::fs::create_directory(TempDir + "/bin"), ok());
146 ASSERT_THAT(llvm::sys::fs::create_directory(TempDir + "/lib"), ok());
148 ASSERT_THAT(llvm::sys::fs::openFileForWrite(TempDir + "/lib/bar", FD), ok());
150 ::chmod((TempDir + "/lib/bar").str().c_str(), 0755); // executable
152 llvm::sys::fs::create_link(TempDir + "/lib/bar", TempDir + "/bin/foo"),
159 Cmd.CommandLine = {(TempDir + "/bin/foo").str(), "foo.cc"};
162 EXPECT_EQ((TempDir + "/lib/foo").str(), Cmd.CommandLine.front());
170 ::setenv("PATH", (TempDir + "/bin").str().c_str(), /*overwrite=*/1);
179 EXPECT_EQ((TempDir + "/lib/foo").str(), Cmd.CommandLine.front());
184 EXPECT_EQ((TempDir + "/bin/foo").str(), Cmd.CommandLine.front());