[clang] ecc9991 - [FrontendTests] Try again to make test not write an output file

Benjamin Kramer via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 22 01:43:25 PDT 2019


Author: Benjamin Kramer
Date: 2019-10-22T08:44:34Z
New Revision: ecc999101aadc8dc7d4af9fd88be10fe42674aa0

URL: https://github.com/llvm/llvm-project/commit/ecc999101aadc8dc7d4af9fd88be10fe42674aa0
DIFF: https://github.com/llvm/llvm-project/commit/ecc999101aadc8dc7d4af9fd88be10fe42674aa0.diff

LOG: [FrontendTests] Try again to make test not write an output file

Setting the output stream to nulls seems to work.

llvm-svn: 375491

Added: 
    

Modified: 
    clang/unittests/Frontend/OutputStreamTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/Frontend/OutputStreamTest.cpp b/clang/unittests/Frontend/OutputStreamTest.cpp
index 14537ecdc56c..6a867bf053cb 100644
--- a/clang/unittests/Frontend/OutputStreamTest.cpp
+++ b/clang/unittests/Frontend/OutputStreamTest.cpp
@@ -58,6 +58,7 @@ TEST(FrontendOutputTests, TestVerboseOutputStreamShared) {
   std::string VerboseBuffer;
   raw_string_ostream VerboseStream(VerboseBuffer);
 
+  Compiler.setOutputStream(std::make_unique<raw_null_ostream>());
   Compiler.setInvocation(std::move(Invocation));
   IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
   Compiler.createDiagnostics(
@@ -86,6 +87,7 @@ TEST(FrontendOutputTests, TestVerboseOutputStreamOwned) {
     std::unique_ptr<raw_ostream> VerboseStream =
         std::make_unique<raw_string_ostream>(VerboseBuffer);
 
+    Compiler.setOutputStream(std::make_unique<raw_null_ostream>());
     Compiler.setInvocation(std::move(Invocation));
     IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
     Compiler.createDiagnostics(


        


More information about the cfe-commits mailing list