aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-05-16 00:31:01 +0300
committerGitHub <noreply@github.com>2019-05-16 00:31:01 +0300
commit67a5af99aa9060c9f4b2350a230343b11282cb8f (patch)
tree992a7f255a89a02db5386e02ff83c76c08a640a1 /mesonbuild/interpreter.py
parent957d8e051c0c29beb0106e75ae7a71acc5c62cf5 (diff)
parentc571b0b18507a13b6aac749a45ea85cb93ffede3 (diff)
downloadmeson-67a5af99aa9060c9f4b2350a230343b11282cb8f.zip
meson-67a5af99aa9060c9f4b2350a230343b11282cb8f.tar.gz
meson-67a5af99aa9060c9f4b2350a230343b11282cb8f.tar.bz2
Merge pull request #5395 from dcbaker/mtest-annotations
Mtest annotations and bug fixes
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 0afbb10..4a91b68 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -39,6 +39,7 @@ from collections import namedtuple
from itertools import chain
from pathlib import PurePath
import functools
+import typing
import importlib
@@ -856,8 +857,10 @@ class RunTargetHolder(InterpreterObject, ObjectHolder):
return r.format(self.__class__.__name__, h.get_id(), h.command)
class Test(InterpreterObject):
- def __init__(self, name, project, suite, exe, depends, is_parallel,
- cmd_args, env, should_fail, timeout, workdir, protocol):
+ def __init__(self, name: str, project: str, suite: typing.List[str], exe: build.Executable,
+ depends: typing.List[typing.Union[build.CustomTarget, build.BuildTarget]],
+ is_parallel: bool, cmd_args: typing.List[str], env: build.EnvironmentVariables,
+ should_fail: bool, timeout: int, workdir: typing.Optional[str], protocol: str):
InterpreterObject.__init__(self)
self.name = name
self.suite = suite
@@ -3254,7 +3257,7 @@ This will become a hard error in the future.''' % kwargs['input'], location=self
def func_test(self, node, args, kwargs):
self.add_test(node, args, kwargs, True)
- def unpack_env_kwarg(self, kwargs):
+ def unpack_env_kwarg(self, kwargs) -> build.EnvironmentVariables:
envlist = kwargs.get('env', EnvironmentVariablesHolder())
if isinstance(envlist, EnvironmentVariablesHolder):
env = envlist.held_object
@@ -3762,10 +3765,7 @@ different subdirectory.
'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=exe_wrapper,
- gdb=gdb,
- timeout_multiplier=timeout_multiplier,
- env=env)
+ self.build.test_setups[setup_name] = build.TestSetup(exe_wrapper, gdb, timeout_multiplier, env)
def get_argdict_on_crossness(self, native_dict, cross_dict, kwargs):
for_native = kwargs.get('native', not self.environment.is_cross_build())