Răsfoiți Sursa

Use temporary module cache in test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212467 91177308-0d34-0410-b5e6-96231b3b80d8
Ben Langmuir 11 ani în urmă
părinte
comite
c12d3d358b
1 a modificat fișierele cu 3 adăugiri și 1 ștergeri
  1. 3 1
      unittests/libclang/LibclangTest.cpp

+ 3 - 1
unittests/libclang/LibclangTest.cpp

@@ -434,7 +434,9 @@ TEST_F(LibclangReparseTest, ReparseWithModule) {
   WriteFile(HeaderName, std::string(HeaderTop) + HeaderBottom);
   WriteFile(ModName, ModFile);
 
-  const char *Args[] = { "-fmodules", "-I", TestDir.c_str() };
+  std::string ModulesCache = std::string("-fmodules-cache-path=") + TestDir;
+  const char *Args[] = { "-fmodules", ModulesCache.c_str(),
+                         "-I", TestDir.c_str() };
   int NumArgs = sizeof(Args) / sizeof(Args[0]);
   ClangTU = clang_parseTranslationUnit(Index, MName.c_str(), Args, NumArgs,
                                        nullptr, 0, TUFlags);