summaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-09-11 00:22:56 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-09-11 00:23:33 +0300
commit4e8c4035e53dc2fca255b0e80f5e1390a8b40607 (patch)
tree924e1b83b3cbc853dcc41e16af84f87db32536ee /test cases
parent32f72fee2553ebc42daac5c9b70386629d47190f (diff)
downloadmeson-4e8c4035e53dc2fca255b0e80f5e1390a8b40607.tar.gz
Can have built binaries in run_targets. Closes #264.
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/58 run target/helloprinter.c10
-rw-r--r--test cases/common/58 run target/meson.build6
2 files changed, 16 insertions, 0 deletions
diff --git a/test cases/common/58 run target/helloprinter.c b/test cases/common/58 run target/helloprinter.c
new file mode 100644
index 000000000..7f94b19fa
--- /dev/null
+++ b/test cases/common/58 run target/helloprinter.c
@@ -0,0 +1,10 @@
+#include<stdio.h>
+
+int main(int argc, char **argv) {
+ if(argc != 2) {
+ printf("I can not haz argument.\n");
+ } else {
+ printf("I can haz argument: %s\n", argv[1]);
+ }
+ return 0;
+}
diff --git a/test cases/common/58 run target/meson.build b/test cases/common/58 run target/meson.build
index 3ae80d217..519adf5df 100644
--- a/test cases/common/58 run target/meson.build
+++ b/test cases/common/58 run target/meson.build
@@ -1,3 +1,9 @@
project('run target', 'c')
run_target('mycommand', 'scripts/script.sh')
+
+# Make it possible to run built programs.
+# In cross builds exe_wrapper should be added if it exists.
+
+exe = executable('helloprinter', 'helloprinter.c')
+run_target('runhello', exe, 'argument')