[Lldb-commits] [PATCH] D100508: [lldb] Simplify output for skipped categories in dotest.py

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 14 18:51:04 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG6ce1067f2ddd: [lldb] Simplify output for skipped categories in dotest.py (authored by JDevlieghere).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100508/new/

https://reviews.llvm.org/D100508

Files:
  lldb/packages/Python/lldbsuite/test/dotest.py


Index: lldb/packages/Python/lldbsuite/test/dotest.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/dotest.py
+++ lldb/packages/Python/lldbsuite/test/dotest.py
@@ -764,7 +764,8 @@
         return # libc++ supported
     if "libc++" in configuration.categories_list:
         return # libc++ category explicitly requested, let it run.
-    print("Libc++ tests will not be run because: " + reason)
+    if configuration.verbose:
+        print("libc++ tests will not be run because: " + reason)
     configuration.skip_categories.append("libc++")
 
 def canRunLibstdcxxTests():
@@ -783,7 +784,8 @@
         return # libstdcxx supported
     if "libstdcxx" in configuration.categories_list:
         return # libstdcxx category explicitly requested, let it run.
-    print("libstdcxx tests will not be run because: " + reason)
+    if configuration.verbose:
+        print("libstdcxx tests will not be run because: " + reason)
     configuration.skip_categories.append("libstdcxx")
 
 def canRunWatchpointTests():
@@ -813,14 +815,16 @@
         return # watchpoints supported
     if "watchpoint" in configuration.categories_list:
         return # watchpoint category explicitly requested, let it run.
-    print("watchpoint tests will not be run because: " + reason)
+    if configuration.verbose:
+        print("watchpoint tests will not be run because: " + reason)
     configuration.skip_categories.append("watchpoint")
 
 def checkObjcSupport():
     from lldbsuite.test import lldbplatformutil
 
     if not lldbplatformutil.platformIsDarwin():
-        print("objc tests will be skipped because of unsupported platform")
+        if configuration.verbose:
+            print("objc tests will be skipped because of unsupported platform")
         configuration.skip_categories.append("objc")
 
 def checkDebugInfoSupport():
@@ -828,16 +832,12 @@
 
     platform = lldb.selected_platform.GetTriple().split('-')[2]
     compiler = configuration.compiler
-    skipped = []
     for cat in test_categories.debug_info_categories:
         if cat in configuration.categories_list:
             continue # Category explicitly requested, let it run.
         if test_categories.is_supported_on_platform(cat, platform, compiler):
             continue
         configuration.skip_categories.append(cat)
-        skipped.append(cat)
-    if skipped:
-        print("Skipping following debug info categories:", skipped)
 
 def checkDebugServerSupport():
     from lldbsuite.test import lldbplatformutil
@@ -849,12 +849,14 @@
         if lldb.remote_platform:
             # <rdar://problem/34539270>
             configuration.skip_categories.append("debugserver")
-            print(skip_msg%"debugserver");
+            if configuration.verbose:
+                print(skip_msg%"debugserver");
     else:
         configuration.skip_categories.append("debugserver")
         if lldb.remote_platform and lldbplatformutil.getPlatform() == "windows":
             configuration.skip_categories.append("llgs")
-            print(skip_msg%"lldb-server");
+            if configuration.verbose:
+                print(skip_msg%"lldb-server");
 
 def run_suite():
     # On MacOS X, check to make sure that domain for com.apple.DebugSymbols defaults
@@ -953,6 +955,8 @@
     checkDebugServerSupport()
     checkObjcSupport()
 
+    print("Skipping the following test categories: {}".format(configuration.skip_categories))
+
     for testdir in configuration.testdirs:
         for (dirpath, dirnames, filenames) in os.walk(testdir):
             visit('Test', dirpath, filenames)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100508.337605.patch
Type: text/x-patch
Size: 3630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210415/faf0689d/attachment-0001.bin>


More information about the lldb-commits mailing list