Skip to content

Commit a8c0413

Browse files
committed
Merge commit 'd37a12d3298b' from apple/main into swift/next
Conflicts: lldb/packages/Python/lldbsuite/test/decorators.py
2 parents 666ef0d + d37a12d commit a8c0413

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lldb/packages/Python/lldbsuite/test/decorators.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,10 +884,16 @@ def skipIfAsan(func):
884884
"""Skip this test if the environment is set up to run LLDB *itself* under ASAN."""
885885
return skipTestIfFn(is_running_under_asan)(func)
886886

887-
def _get_bool_config(key):
887+
def _get_bool_config(key, fail_value = True):
888+
"""
889+
Returns the current LLDB's build config value.
890+
:param key The key to lookup in LLDB's build configuration.
891+
:param fail_value The error value to return when the key can't be found.
892+
Defaults to true so that if an unknown key is lookup up we rather
893+
enable more tests (that then fail) than silently skipping them.
894+
"""
888895
config = lldb.SBDebugger.GetBuildConfiguration()
889896
value_node = config.GetValueForKey(key)
890-
fail_value = True # More likely to notice if something goes wrong
891897
return value_node.GetValueForKey("value").GetBooleanValue(fail_value)
892898

893899
def _get_bool_config_skip_if_decorator(key):

0 commit comments

Comments
 (0)