aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/dotest.py
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2021-04-14 18:49:57 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2021-04-14 18:50:48 -0700
commit6ce1067f2ddd8623b163175ee9488673b9ced8d2 (patch)
tree9ce7688d5669f50fb15c82b47ad7dd51624e2b7d /lldb/packages/Python/lldbsuite/test/dotest.py
parentb7459a10dad1cf71dc0e6dcb97256bfbe3c2a28d (diff)
downloadllvm-6ce1067f2ddd8623b163175ee9488673b9ced8d2.zip
llvm-6ce1067f2ddd8623b163175ee9488673b9ced8d2.tar.gz
llvm-6ce1067f2ddd8623b163175ee9488673b9ced8d2.tar.bz2
[lldb] Simplify output for skipped categories in dotest.py
Print a single line listing all the categories that are being skipped, rather than relying on the check.*Support() functions specifying why a particular category will be skipped. If we know why a category got skipped, still print that in verbose mode. The motivation for this change is that sometimes engineers misidentify the output of these messages as the cause for a test failure (e.g. not being able to build libc++ or libstdc++). Differential revision: https://reviews.llvm.org/D100508
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 6617d37..39e130a 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -764,7 +764,8 @@ def checkLibcxxSupport():
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 @@ def checkLibstdcxxSupport():
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 @@ def checkWatchpointSupport():
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 @@ def checkDebugInfoSupport():
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 @@ def checkDebugServerSupport():
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 @@ def run_suite():
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)