@typed_pos_args('add_test_setup', str)
@typed_kwargs('add_test_setup', KwargInfo('exe_wrapper', ContainerTypeInfo(list, (str, ExternalProgram)), listify=True, default=[]), KwargInfo('gdb', bool, default=False), KwargInfo('timeout_multiplier', int, default=1), KwargInfo('exclude_suites', ContainerTypeInfo(list, str), listify=True, default=[], since='0.57.0'), KwargInfo('is_default', bool, default=False, since='0.49.0'), ENV_KW)
def func_add_test_setup(self, node: mparser.BaseNode, args: T.Tuple[str], kwargs: 'kwargs.AddTestSetup') -> None:
    setup_name = args[0]
    if (re.fullmatch('([_a-zA-Z][_0-9a-zA-Z]*:)?[_a-zA-Z][_0-9a-zA-Z]*', setup_name) is None):
        raise InterpreterException('Setup name may only contain alphanumeric characters.')
    if (':' not in setup_name):
        setup_name = f'{(self.subproject if self.subproject else self.build.project_name)}:{setup_name}'
    exe_wrapper: T.List[str] = []
    for i in kwargs['exe_wrapper']:
        if isinstance(i, str):
            exe_wrapper.append(i)
        else:
            if (not i.found()):
                raise InterpreterException('Tried to use non-found executable.')
            exe_wrapper += i.get_command()
    timeout_multiplier = kwargs['timeout_multiplier']
    if (timeout_multiplier <= 0):
        FeatureNew('add_test_setup() timeout_multiplier <= 0', '0.57.0').use(self.subproject)
    if kwargs['is_default']:
        if (self.build.test_setup_default_name is not None):
            raise InterpreterException(f'{self.build.test_setup_default_name!r} is already set as default. is_default can be set to true only once')
        self.build.test_setup_default_name = setup_name
    self.build.test_setups[setup_name] = build.TestSetup(exe_wrapper, kwargs['gdb'], timeout_multiplier, kwargs['env'], kwargs['exclude_suites'])
@typed_pos_args('add_test_setup', str)
@typed_kwargs('add_test_setup', KwargInfo('exe_wrapper', ContainerTypeInfo(list, (str, ExternalProgram)), listify=True, default=[]), KwargInfo('gdb', bool, default=False), KwargInfo('timeout_multiplier', int, default=1), KwargInfo('exclude_suites', ContainerTypeInfo(list, str), listify=True, default=[], since='0.57.0'), KwargInfo('is_default', bool, default=False, since='0.49.0'), ENV_KW)
def func_add_test_setup(self, node: mparser.BaseNode, args: T.Tuple[str], kwargs: 'kwargs.AddTestSetup') -> None:
    setup_name = args[0]
    if (re.fullmatch('([_a-zA-Z][_0-9a-zA-Z]*:)?[_a-zA-Z][_0-9a-zA-Z]*', setup_name) is None):
        raise InterpreterException('Setup name may only contain alphanumeric characters.')
    if (':' not in setup_name):
        setup_name = f'{(self.subproject if self.subproject else self.build.project_name)}:{setup_name}'
    exe_wrapper: T.List[str] = []
    for i in kwargs['exe_wrapper']:
        if isinstance(i, str):
            exe_wrapper.append(i)
        else:
            if (not i.found()):
                raise InterpreterException('Tried to use non-found executable.')
            exe_wrapper += i.get_command()
    timeout_multiplier = kwargs['timeout_multiplier']
    if (timeout_multiplier <= 0):
        FeatureNew('add_test_setup() timeout_multiplier <= 0', '0.57.0').use(self.subproject)
    if kwargs['is_default']:
        if (self.build.test_setup_default_name is not None):
            raise InterpreterException(f'{self.build.test_setup_default_name!r} is already set as default. is_default can be set to true only once')
        self.build.test_setup_default_name = setup_name
    self.build.test_setups[setup_name] = build.TestSetup(exe_wrapper, kwargs['gdb'], timeout_multiplier, kwargs['env'], kwargs['exclude_suites'])