OSDN Git Service

[lldb/test] Use shorter test case names in TestStandardUnwind
authorJordan Rupprecht <rupprecht@google.com>
Fri, 28 Aug 2020 18:49:50 +0000 (11:49 -0700)
committerJordan Rupprecht <rupprecht@google.com>
Fri, 28 Aug 2020 18:49:50 +0000 (11:49 -0700)
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.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D86752

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

index 032b9e1..fdf4889 100644 (file)
@@ -164,7 +164,7 @@ for f in test_source_files:
                 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, '_')