File tree 1 file changed +12
-3
lines changed
lldb/packages/Python/lldbsuite/test
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -815,11 +815,20 @@ def skipIfAsan(func):
815
815
"""Skip this test if the environment is set up to run LLDB *itself* under ASAN."""
816
816
return skipTestIfFn (is_running_under_asan )(func )
817
817
818
- def _get_bool_config_skip_if_decorator (key ):
818
+ def _get_bool_config (key , fail_value = True ):
819
+ """
820
+ Returns the current LLDB's build config value.
821
+ :param key The key to lookup in LLDB's build configuration.
822
+ :param fail_value The error value to return when the key can't be found.
823
+ Defaults to true so that if an unknown key is lookup up we rather
824
+ enable more tests (that then fail) than silently skipping them.
825
+ """
819
826
config = lldb .SBDebugger .GetBuildConfiguration ()
820
827
value_node = config .GetValueForKey (key )
821
- fail_value = True # More likely to notice if something goes wrong
822
- have = value_node .GetValueForKey ("value" ).GetBooleanValue (fail_value )
828
+ return value_node .GetValueForKey ("value" ).GetBooleanValue (fail_value )
829
+
830
+ def _get_bool_config_skip_if_decorator (key ):
831
+ have = _get_bool_config (key )
823
832
return unittest2 .skipIf (not have , "requires " + key )
824
833
825
834
def skipIfCursesSupportMissing (func ):
You can’t perform that action at this time.
0 commit comments