|
|
|
@ -614,7 +614,7 @@ class RunTargetHolder(InterpreterObject): |
|
|
|
|
self.held_object = build.RunTarget(name, command, args, dependencies, subdir) |
|
|
|
|
|
|
|
|
|
class Test(InterpreterObject): |
|
|
|
|
def __init__(self, name, suite, exe, is_parallel, cmd_args, env, should_fail, valgrind_args, timeout, workdir): |
|
|
|
|
def __init__(self, name, suite, exe, is_parallel, cmd_args, env, should_fail, timeout, workdir): |
|
|
|
|
InterpreterObject.__init__(self) |
|
|
|
|
self.name = name |
|
|
|
|
self.suite = suite |
|
|
|
@ -623,7 +623,6 @@ class Test(InterpreterObject): |
|
|
|
|
self.cmd_args = cmd_args |
|
|
|
|
self.env = env |
|
|
|
|
self.should_fail = should_fail |
|
|
|
|
self.valgrind_args = valgrind_args |
|
|
|
|
self.timeout = timeout |
|
|
|
|
self.workdir = workdir |
|
|
|
|
|
|
|
|
@ -2128,12 +2127,8 @@ requirements use the version keyword argument instead.''') |
|
|
|
|
if ' ' in k: |
|
|
|
|
raise InterpreterException('Env var key must not have spaces in it.') |
|
|
|
|
env[k] = val |
|
|
|
|
valgrind_args = kwargs.get('valgrind_args', []) |
|
|
|
|
if not isinstance(valgrind_args, list): |
|
|
|
|
valgrind_args = [valgrind_args] |
|
|
|
|
for a in valgrind_args: |
|
|
|
|
if not isinstance(a, str): |
|
|
|
|
raise InterpreterException('Valgrind_arg not a string.') |
|
|
|
|
if not isinstance(envlist, list): |
|
|
|
|
envlist = [envlist] |
|
|
|
|
should_fail = kwargs.get('should_fail', False) |
|
|
|
|
if not isinstance(should_fail, bool): |
|
|
|
|
raise InterpreterException('Keyword argument should_fail must be a boolean.') |
|
|
|
@ -2156,7 +2151,7 @@ requirements use the version keyword argument instead.''') |
|
|
|
|
s = '.' + s |
|
|
|
|
newsuite.append(self.subproject.replace(' ', '_').replace('.', '_') + s) |
|
|
|
|
suite = newsuite |
|
|
|
|
t = Test(args[0], suite, args[1].held_object, par, cmd_args, env, should_fail, valgrind_args, timeout, workdir) |
|
|
|
|
t = Test(args[0], suite, args[1].held_object, par, cmd_args, env, should_fail, timeout, workdir) |
|
|
|
|
if is_base_test: |
|
|
|
|
self.build.tests.append(t) |
|
|
|
|
mlog.debug('Adding test "', mlog.bold(args[0]), '".', sep='') |
|
|
|
|