@permittedKwargs(permitted_kwargs['add_test_setup'])
@stringArgs
def func_add_test_setup(self, node, args, kwargs):
    if (len(args) != 1):
        raise InterpreterException('Add_test_setup needs one argument for the setup name.')
    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 = (((self.subproject if self.subproject else self.build.project_name) + ':') + setup_name)
    try:
        inp = unholder(extract_as_list(kwargs, 'exe_wrapper'))
        exe_wrapper = []
        for i in inp:
            if isinstance(i, str):
                exe_wrapper.append(i)
            elif isinstance(i, dependencies.ExternalProgram):
                if (not i.found()):
                    raise InterpreterException('Tried to use non-found executable.')
                exe_wrapper += i.get_command()
            else:
                raise InterpreterException('Exe wrapper can only contain strings or external binaries.')
    except KeyError:
        exe_wrapper = None
    gdb = kwargs.get('gdb', False)
    if (not isinstance(gdb, bool)):
        raise InterpreterException('Gdb option must be a boolean')
    timeout_multiplier = kwargs.get('timeout_multiplier', 1)
    if (not isinstance(timeout_multiplier, int)):
        raise InterpreterException('Timeout multiplier must be a number.')
    is_default = kwargs.get('is_default', False)
    if (not isinstance(is_default, bool)):
        raise InterpreterException('is_default option must be a boolean')
    if is_default:
        if (self.build.test_setup_default_name is not None):
            raise InterpreterException(("'%s' is already set as default. is_default can be set to true only once" % self.build.test_setup_default_name))
        self.build.test_setup_default_name = setup_name
    env = self.unpack_env_kwarg(kwargs)
    self.build.test_setups[setup_name] = build.TestSetup(exe_wrapper, gdb, timeout_multiplier, env)
@permittedKwargs(permitted_kwargs['add_test_setup'])
@stringArgs
def func_add_test_setup(self, node, args, kwargs):
    if (len(args) != 1):
        raise InterpreterException('Add_test_setup needs one argument for the setup name.')
    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 = (((self.subproject if self.subproject else self.build.project_name) + ':') + setup_name)
    try:
        inp = unholder(extract_as_list(kwargs, 'exe_wrapper'))
        exe_wrapper = []
        for i in inp:
            if isinstance(i, str):
                exe_wrapper.append(i)
            elif isinstance(i, dependencies.ExternalProgram):
                if (not i.found()):
                    raise InterpreterException('Tried to use non-found executable.')
                exe_wrapper += i.get_command()
            else:
                raise InterpreterException('Exe wrapper can only contain strings or external binaries.')
    except KeyError:
        exe_wrapper = None
    gdb = kwargs.get('gdb', False)
    if (not isinstance(gdb, bool)):
        raise InterpreterException('Gdb option must be a boolean')
    timeout_multiplier = kwargs.get('timeout_multiplier', 1)
    if (not isinstance(timeout_multiplier, int)):
        raise InterpreterException('Timeout multiplier must be a number.')
    is_default = kwargs.get('is_default', False)
    if (not isinstance(is_default, bool)):
        raise InterpreterException('is_default option must be a boolean')
    if is_default:
        if (self.build.test_setup_default_name is not None):
            raise InterpreterException(("'%s' is already set as default. is_default can be set to true only once" % self.build.test_setup_default_name))
        self.build.test_setup_default_name = setup_name
    env = self.unpack_env_kwarg(kwargs)
    self.build.test_setups[setup_name] = build.TestSetup(exe_wrapper, gdb, timeout_multiplier, env)