@@ -623,9 +623,8 @@ def skipUnlessTargetAndroid(func):
623
623
def swiftTest (func ):
624
624
"""Decorate the item as a Swift test (Darwin/Linux only, no i386)."""
625
625
def is_not_swift_compatible (self ):
626
- swift_enabled_error = _get_bool_config_skip_if_decorator ("swift" )(func )
627
- if swift_enabled_error :
628
- return swift_enabled_error
626
+ if not _get_bool_config ("swift" ):
627
+ return "Swift plugin not enabled"
629
628
if self .getDebugInfo () == "gmodules" :
630
629
return "skipping (gmodules only makes sense for clang tests)"
631
630
@@ -883,11 +882,14 @@ def skipIfAsan(func):
883
882
"""Skip this test if the environment is set up to run LLDB *itself* under ASAN."""
884
883
return skipTestIfFn (is_running_under_asan )(func )
885
884
886
- def _get_bool_config_skip_if_decorator (key ):
885
+ def _get_bool_config (key ):
887
886
config = lldb .SBDebugger .GetBuildConfiguration ()
888
887
value_node = config .GetValueForKey (key )
889
888
fail_value = True # More likely to notice if something goes wrong
890
- have = value_node .GetValueForKey ("value" ).GetBooleanValue (fail_value )
889
+ return value_node .GetValueForKey ("value" ).GetBooleanValue (fail_value )
890
+
891
+ def _get_bool_config_skip_if_decorator (key ):
892
+ have = _get_bool_config (key )
891
893
return unittest2 .skipIf (not have , "requires " + key )
892
894
893
895
def skipIfCursesSupportMissing (func ):
0 commit comments