[LNT] r273215 - Make shortname guesses work better in LNT compile

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 16:04:25 PDT 2016


Author: cmatthews
Date: Mon Jun 20 18:04:25 2016
New Revision: 273215

URL: http://llvm.org/viewvc/llvm-project?rev=273215&view=rev
Log:
Make shortname guesses work better in LNT compile

Modified:
    lnt/trunk/lnt/server/ui/util.py

Modified: lnt/trunk/lnt/server/ui/util.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/util.py?rev=273215&r1=273214&r2=273215&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/util.py (original)
+++ lnt/trunk/lnt/server/ui/util.py Mon Jun 20 18:04:25 2016
@@ -297,6 +297,15 @@ FLASH_WARNING = "alert alert-warning"
 
 
 def guess_test_short_name(test_name):
-    """In some places the fully qualified test name is too long, 
-    try to make a shorter one."""
-    return test_name.split("/")[-1]
+    """In some places the fully qualified test name is too long,
+    try to make a shorter one.
+    """
+    split_name = test_name.split("/")
+    last_path_name = split_name[-1]
+    
+    # LNT Compile tests are stragely named:
+    # compile/TestName/phase/(opt level)
+    if last_path_name.startswith("("):
+        return split_name[-3]
+    else:
+        return last_path_name




More information about the llvm-commits mailing list