diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-02 22:39:57 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-03-02 22:39:57 +0200 |
commit | 5498f16fb35717a3175e61bf65666c43089efc30 (patch) | |
tree | 8253ee9bef5785f7469575f5289dbc87b27d13bb /test cases/common/107 postconf | |
parent | 455e55f8e51c328400c36d65a15d76e7c4be08eb (diff) | |
parent | 5e1fdb8b971cf963958b1be2baac10b0edb0eaa2 (diff) | |
download | meson-5498f16fb35717a3175e61bf65666c43089efc30.zip meson-5498f16fb35717a3175e61bf65666c43089efc30.tar.gz meson-5498f16fb35717a3175e61bf65666c43089efc30.tar.bz2 |
Merged postconf script.
Diffstat (limited to 'test cases/common/107 postconf')
-rw-r--r-- | test cases/common/107 postconf/meson.build | 5 | ||||
-rw-r--r-- | test cases/common/107 postconf/postconf.py | 11 | ||||
-rw-r--r-- | test cases/common/107 postconf/prog.c | 5 | ||||
-rw-r--r-- | test cases/common/107 postconf/raw.dat | 1 |
4 files changed, 22 insertions, 0 deletions
diff --git a/test cases/common/107 postconf/meson.build b/test cases/common/107 postconf/meson.build new file mode 100644 index 0000000..12b3c5b --- /dev/null +++ b/test cases/common/107 postconf/meson.build @@ -0,0 +1,5 @@ +project('postconf script', 'c') + +meson.add_postconf_script('postconf.py') + +test('post', executable('prog', 'prog.c')) diff --git a/test cases/common/107 postconf/postconf.py b/test cases/common/107 postconf/postconf.py new file mode 100644 index 0000000..d185f94 --- /dev/null +++ b/test cases/common/107 postconf/postconf.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +import sys, os + +template = '''#pragma once + +#define THE_NUMBER {} +''' + +data = open(os.path.join(sys.argv[1], 'raw.dat')).readline().strip() +open(os.path.join(sys.argv[2], 'generated.h'), 'w').write(template.format(data)) diff --git a/test cases/common/107 postconf/prog.c b/test cases/common/107 postconf/prog.c new file mode 100644 index 0000000..1e5d4cb --- /dev/null +++ b/test cases/common/107 postconf/prog.c @@ -0,0 +1,5 @@ +#include"generated.h" + +int main(int argc, char **argv) { + return THE_NUMBER != 9; +} diff --git a/test cases/common/107 postconf/raw.dat b/test cases/common/107 postconf/raw.dat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/test cases/common/107 postconf/raw.dat @@ -0,0 +1 @@ +9 |