Author: Raphael Isemann
Date: 2020-08-25T20:26:43+02:00
New Revision: ef76686916d40f20c782ed3967130bd2e0105b31

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

LOG: [lldb] Initialize reproducers in LocateSymbolFileTest

Since a842950b62b6d029a392c3c312c6495d6368c2a4 this test started using
the reproducer subsystem but we never initialized it in the test. The
Subsystem takes an argument, so we can't use the usual SubsystemRAII at the
moment to do this for us.

This just adds the initialize/terminate calls to get the test passing again.

Added: 
    

Modified: 
    lldb/unittests/Symbol/LocateSymbolFileTest.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/unittests/Symbol/LocateSymbolFileTest.cpp 
b/lldb/unittests/Symbol/LocateSymbolFileTest.cpp
index 268faeaf1dbb..a2f9be56635d 100644
--- a/lldb/unittests/Symbol/LocateSymbolFileTest.cpp
+++ b/lldb/unittests/Symbol/LocateSymbolFileTest.cpp
@@ -14,6 +14,7 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Symbol/LocateSymbolFile.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/Reproducer.h"
 
 using namespace lldb_private;
 
@@ -27,15 +28,22 @@ class SymbolsTest : public ::testing::Test {
 TEST_F(
     SymbolsTest,
     
TerminateLocateExecutableSymbolFileForUnknownExecutableAndUnknownSymbolFile) {
+  EXPECT_THAT_ERROR(
+      repro::Reproducer::Initialize(repro::ReproducerMode::Off, llvm::None),
+      llvm::Succeeded());
   ModuleSpec module_spec;
   FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
   FileSpec symbol_file_spec =
       Symbols::LocateExecutableSymbolFile(module_spec, search_paths);
   EXPECT_TRUE(symbol_file_spec.GetFilename().IsEmpty());
+  repro::Reproducer::Terminate();
 }
 
 TEST_F(SymbolsTest,
        LocateExecutableSymbolFileForUnknownExecutableAndMissingSymbolFile) {
+  EXPECT_THAT_ERROR(
+      repro::Reproducer::Initialize(repro::ReproducerMode::Off, llvm::None),
+      llvm::Succeeded());
   ModuleSpec module_spec;
   // using a GUID here because the symbol file shouldn't actually exist on disk
   module_spec.GetSymbolFileSpec().SetFile(
@@ -44,4 +52,5 @@ TEST_F(SymbolsTest,
   FileSpec symbol_file_spec =
       Symbols::LocateExecutableSymbolFile(module_spec, search_paths);
   EXPECT_TRUE(symbol_file_spec.GetFilename().IsEmpty());
+  repro::Reproducer::Terminate();
 }


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to