[Lldb-commits] [PATCH] D86752: [lldb/test] Use shorter test case names in TestStandardUnwind

Jordan Rupprecht via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 27 17:18:49 PDT 2020


rupprecht created this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
rupprecht requested review of this revision.
Herald added a subscriber: JDevlieghere.

TestStandardUnwind uses the full absolute path to a set of C/C++ files as the test case name, which in turn is used in the name of a log file. When the source file is long, and the directory where log files are stored is also long, this causes an OSError because the log filename is too long.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86752

Files:
  lldb/test/API/functionalities/unwind/standard/TestStandardUnwind.py


Index: lldb/test/API/functionalities/unwind/standard/TestStandardUnwind.py
===================================================================
--- lldb/test/API/functionalities/unwind/standard/TestStandardUnwind.py
+++ lldb/test/API/functionalities/unwind/standard/TestStandardUnwind.py
@@ -164,7 +164,7 @@
                 self.skipTest("Inferior not supported")
             self.standard_unwind_tests()
 
-        test_name = "test_unwind_" + str(f)
+        test_name = "test_unwind_" + str(os.path.basename(f))
         for c in ".=()/\\":
             test_name = test_name.replace(c, '_')
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86752.288486.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200828/bc9d461d/attachment-0001.bin>


More information about the lldb-commits mailing list