[llvm] [lit] Add support to print relative paths when outputting test names (PR #154317)

Björn Pettersson via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 19 11:51:13 PDT 2025


================
@@ -307,6 +307,11 @@ def isFailure(self):
     def getFullName(self):
         return self.suite.config.name + " :: " + "/".join(self.path_in_suite)
 
+    def getFullNameRelPath(self, printRelativePaths):
+        if printRelativePaths:
+            return self.suite.config.name + " :: " + os.path.relpath(self.getFilePath())
----------------
bjope wrote:

In the summary report with failed tests (or when using `--show-pass` etc.) we can skip the test suite name and `::`.

My initial commit in this pull requst also change the output that list progress of tests such as 
`  PASS: LLVM :: Analysis/DemandedBits/basic.ll (1425 of 1444) `
but I think it would be enough to print the path relative cwd in the summary report.

Maybe I should limit this new option to those summary printouts (undoing the changes in `display.py`)?
(I'll prepare such an update...)


https://github.com/llvm/llvm-project/pull/154317


More information about the llvm-commits mailing list