aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/interpreter/interpreter.py2
-rw-r--r--test cases/failing/116 run_target in test/meson.build4
-rw-r--r--test cases/failing/116 run_target in test/test.json8
-rw-r--r--test cases/failing/116 run_target in test/trivial.c6
4 files changed, 19 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 211bdb5..fc1db8b 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -192,7 +192,7 @@ known_build_target_kwargs = (
)
TEST_KWARGS: T.List[KwargInfo] = [
- KwargInfo('args', ContainerTypeInfo(list, (str, mesonlib.File, build.Target)),
+ KwargInfo('args', ContainerTypeInfo(list, (str, mesonlib.File, build.BuildTarget, build.CustomTarget)),
listify=True, default=[]),
KwargInfo('should_fail', bool, default=False),
KwargInfo('timeout', int, default=30),
diff --git a/test cases/failing/116 run_target in test/meson.build b/test cases/failing/116 run_target in test/meson.build
new file mode 100644
index 0000000..db7cb30
--- /dev/null
+++ b/test cases/failing/116 run_target in test/meson.build
@@ -0,0 +1,4 @@
+project('trivial test', 'c')
+exe = executable('trivialprog', 'trivial.c')
+runt = run_target('invalid', command: ['echo', 'run_target'])
+test('runtest', exe, args: runt)
diff --git a/test cases/failing/116 run_target in test/test.json b/test cases/failing/116 run_target in test/test.json
new file mode 100644
index 0000000..c273a3b
--- /dev/null
+++ b/test cases/failing/116 run_target in test/test.json
@@ -0,0 +1,8 @@
+{
+ "stdout": [
+ {
+ "line": "test cases/failing/116 run_target in test/meson.build:4:0: ERROR: test keyword argument 'args' was of type 'list' but should have been list[str,File,BuildTarget,CustomTarget]"
+ }
+ ]
+}
+
diff --git a/test cases/failing/116 run_target in test/trivial.c b/test cases/failing/116 run_target in test/trivial.c
new file mode 100644
index 0000000..96612d4
--- /dev/null
+++ b/test cases/failing/116 run_target in test/trivial.c
@@ -0,0 +1,6 @@
+#include<stdio.h>
+
+int main(void) {
+ printf("Trivial test is working.\n");
+ return 0;
+}