[Lldb-commits] [lldb] r348289 - [Reproducers] Only creaate the bottom-most dir

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Dec 4 10:16:49 PST 2018


Author: jdevlieghere
Date: Tue Dec  4 10:16:49 2018
New Revision: 348289

URL: http://llvm.org/viewvc/llvm-project?rev=348289&view=rev
Log:
[Reproducers] Only creaate the bottom-most dir

As Pavel noted on the mailing list we should only create the bottom-most
directory if it doesn't exist. This should also fix the test case on
Windows as we can use lit's temp directory.

Modified:
    lldb/trunk/lit/Reproducer/TestDriverOptions.test
    lldb/trunk/source/Utility/Reproducer.cpp

Modified: lldb/trunk/lit/Reproducer/TestDriverOptions.test
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Reproducer/TestDriverOptions.test?rev=348289&r1=348288&r2=348289&view=diff
==============================================================================
--- lldb/trunk/lit/Reproducer/TestDriverOptions.test (original)
+++ lldb/trunk/lit/Reproducer/TestDriverOptions.test Tue Dec  4 10:16:49 2018
@@ -1,10 +1,7 @@
-# FIXME: Find out why this fails on Windows.
-# UNSUPPORTED: system-windows
-
 # Check that errors are propagated to the driver.
 
-# RUN: not %lldb --capture /bogus 2>&1 | FileCheck %s --check-prefix CAPTURE
-# RUN: not %lldb --replay /bogus  2>&1 | FileCheck %s --check-prefix REPLAY
+# RUN: not %lldb --capture %t/bogus/bogus 2>&1 | FileCheck %s --check-prefix CAPTURE
+# RUN: not %lldb --replay %t/bogus/bogus  2>&1 | FileCheck %s --check-prefix REPLAY
 
 # CAPTURE: unable to create reproducer directory
 # REPLAY: unable to load reproducer index

Modified: lldb/trunk/source/Utility/Reproducer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Reproducer.cpp?rev=348289&r1=348288&r2=348289&view=diff
==============================================================================
--- lldb/trunk/source/Utility/Reproducer.cpp (original)
+++ lldb/trunk/source/Utility/Reproducer.cpp Tue Dec  4 10:16:49 2018
@@ -36,7 +36,7 @@ llvm::Error Reproducer::Initialize(Repro
             "unable to create unique reproducer directory", ec);
       root.emplace(repro_dir);
     } else {
-      auto ec = sys::fs::create_directories(root->GetPath());
+      auto ec = sys::fs::create_directory(root->GetPath());
       if (ec)
         return make_error<StringError>("unable to create reproducer directory",
                                        ec);




More information about the lldb-commits mailing list