diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-01-14 17:36:12 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-01-15 19:45:23 +0200 |
commit | db8ad2a4bd4ed1e962e1cbfa76bd8abdf5e83b0e (patch) | |
tree | d94324a7da9d14f6cb8542938bcef23633413a50 /test cases | |
parent | b1087f011cb815a5214791ab92e7214e01b45b72 (diff) | |
download | meson-db8ad2a4bd4ed1e962e1cbfa76bd8abdf5e83b0e.zip meson-db8ad2a4bd4ed1e962e1cbfa76bd8abdf5e83b0e.tar.gz meson-db8ad2a4bd4ed1e962e1cbfa76bd8abdf5e83b0e.tar.bz2 |
Add test for build_on_all.
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/unit/4 build on all/foo.c | 6 | ||||
-rw-r--r-- | test cases/unit/4 build on all/meson.build | 13 | ||||
-rw-r--r-- | test cases/unit/4 build on all/mygen.py | 8 | ||||
-rw-r--r-- | test cases/unit/4 build on all/source.txt | 1 |
4 files changed, 28 insertions, 0 deletions
diff --git a/test cases/unit/4 build on all/foo.c b/test cases/unit/4 build on all/foo.c new file mode 100644 index 0000000..ca97916 --- /dev/null +++ b/test cases/unit/4 build on all/foo.c @@ -0,0 +1,6 @@ +#include<stdio.h> + +int main(int argc, char **argv) { + printf("Existentialism.\n"); + return 0; +} diff --git a/test cases/unit/4 build on all/meson.build b/test cases/unit/4 build on all/meson.build new file mode 100644 index 0000000..5a746a5 --- /dev/null +++ b/test cases/unit/4 build on all/meson.build @@ -0,0 +1,13 @@ +project('build on all', 'c') + +py3_mod = import('python3') +py3 = py3_mod.find_python() + +executable('fooprog', 'foo.c', build_on_all : false) +comp = files('mygen.py') +mytarget = custom_target('gendat', + output : 'generated.dat', + input : 'source.txt', + command : [py3] + comp + ['@INPUT@', '@OUTPUT@'], + build_on_all : true, +) diff --git a/test cases/unit/4 build on all/mygen.py b/test cases/unit/4 build on all/mygen.py new file mode 100644 index 0000000..5a74153 --- /dev/null +++ b/test cases/unit/4 build on all/mygen.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python3 + +import sys + +ifile = open(sys.argv[1]) +ofile = open(sys.argv[2], 'w') + +ofile.write(ifile.read()) diff --git a/test cases/unit/4 build on all/source.txt b/test cases/unit/4 build on all/source.txt new file mode 100644 index 0000000..3573f4b --- /dev/null +++ b/test cases/unit/4 build on all/source.txt @@ -0,0 +1 @@ +I am a bunch of text. |