[clang-tools-extra] r308721 - [clangd] Specified --gcc-toolchain explicitly in VFS test.
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 21 01:20:47 PDT 2017
Author: ibiryukov
Date: Fri Jul 21 01:20:47 2017
New Revision: 308721
URL: http://llvm.org/viewvc/llvm-project?rev=308721&view=rev
Log:
[clangd] Specified --gcc-toolchain explicitly in VFS test.
In order to avoid platform-specific configuration quirks.
(Possible fix for https://bugs.llvm.org/show_bug.cgi?id=33842)
Modified:
clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp
Modified: clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp?rev=308721&r1=308720&r2=308721&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/ClangdTests.cpp Fri Jul 21 01:20:47 2017
@@ -422,9 +422,9 @@ TEST_F(ClangdVFSTest, SearchLibDir) {
MockFSProvider FS;
ErrorCheckingDiagConsumer DiagConsumer;
MockCompilationDatabase CDB(/*AddFreestandingFlag=*/true);
- CDB.ExtraClangFlags.insert(
- CDB.ExtraClangFlags.end(),
- {"-xc++", "-target", "x86_64-linux-unknown", "-m64"});
+ CDB.ExtraClangFlags.insert(CDB.ExtraClangFlags.end(),
+ {"-xc++", "-target", "x86_64-linux-unknown",
+ "-m64", "--gcc-toolchain=/randomusr"});
ClangdServer Server(CDB, DiagConsumer, FS,
/*RunSynchronously=*/true);
@@ -432,7 +432,7 @@ TEST_F(ClangdVFSTest, SearchLibDir) {
SmallString<8> Version("4.9.3");
// A lib dir for gcc installation
- SmallString<64> LibDir("/usr/lib/gcc/x86_64-linux-gnu");
+ SmallString<64> LibDir("/randomusr/lib/gcc/x86_64-linux-gnu");
llvm::sys::path::append(LibDir, Version);
// Put crtbegin.o into LibDir/64 to trick clang into thinking there's a gcc
@@ -441,7 +441,7 @@ TEST_F(ClangdVFSTest, SearchLibDir) {
llvm::sys::path::append(DummyLibFile, LibDir, "64", "crtbegin.o");
FS.Files[DummyLibFile] = "";
- SmallString<64> IncludeDir("/usr/include/c++");
+ SmallString<64> IncludeDir("/randomusr/include/c++");
llvm::sys::path::append(IncludeDir, Version);
SmallString<64> StringPath;
More information about the cfe-commits
mailing list