Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b7c73a4

Browse files
committed
Merge commit '8711013c8102' from apple/stable/20200714 into swift/main
Conflicts: lldb/packages/Python/lldbsuite/test/decorators.py
2 parents 5e139f4 + 8711013 commit b7c73a4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -869,10 +869,16 @@ def skipIfAsan(func):
869869
"""Skip this test if the environment is set up to run LLDB *itself* under ASAN."""
870870
return skipTestIfFn(is_running_under_asan)(func)
871871

872-
def _get_bool_config(key):
872+
def _get_bool_config(key, fail_value = True):
873+
"""
874+
Returns the current LLDB's build config value.
875+
:param key The key to lookup in LLDB's build configuration.
876+
:param fail_value The error value to return when the key can't be found.
877+
Defaults to true so that if an unknown key is lookup up we rather
878+
enable more tests (that then fail) than silently skipping them.
879+
"""
873880
config = lldb.SBDebugger.GetBuildConfiguration()
874881
value_node = config.GetValueForKey(key)
875-
fail_value = True # More likely to notice if something goes wrong
876882
return value_node.GetValueForKey("value").GetBooleanValue(fail_value)
877883

878884
def _get_bool_config_skip_if_decorator(key):

0 commit comments

Comments
 (0)