diff options
Diffstat (limited to 'test cases/common/8 install')
-rwxr-xr-x | test cases/common/8 install/gendir.py | 8 | ||||
-rw-r--r-- | test cases/common/8 install/meson.build | 10 | ||||
-rw-r--r-- | test cases/common/8 install/prog.c | 3 | ||||
-rw-r--r-- | test cases/common/8 install/stat.c | 1 | ||||
-rw-r--r-- | test cases/common/8 install/test.json | 9 |
5 files changed, 31 insertions, 0 deletions
diff --git a/test cases/common/8 install/gendir.py b/test cases/common/8 install/gendir.py new file mode 100755 index 0000000..b42327d --- /dev/null +++ b/test cases/common/8 install/gendir.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python3 + +import sys, os + +dirname = sys.argv[1] +fname = os.path.join(dirname, 'file.txt') +os.makedirs(dirname, exist_ok=True) +open(fname, 'w').close() diff --git a/test cases/common/8 install/meson.build b/test cases/common/8 install/meson.build new file mode 100644 index 0000000..6eb5ba5 --- /dev/null +++ b/test cases/common/8 install/meson.build @@ -0,0 +1,10 @@ +project('install test', 'c', default_options : ['libdir=libtest']) + +stlib = static_library('stat', 'stat.c', install : true) +exe = executable('prog', 'prog.c', install : true) + +dirtarget = custom_target('dirtarget', + output: ['dir'], + install: true, + command: [find_program('gendir.py'), '@OUTPUT@'], + install_dir: get_option('datadir')) diff --git a/test cases/common/8 install/prog.c b/test cases/common/8 install/prog.c new file mode 100644 index 0000000..9b6bdc2 --- /dev/null +++ b/test cases/common/8 install/prog.c @@ -0,0 +1,3 @@ +int main(void) { + return 0; +} diff --git a/test cases/common/8 install/stat.c b/test cases/common/8 install/stat.c new file mode 100644 index 0000000..4825cef --- /dev/null +++ b/test cases/common/8 install/stat.c @@ -0,0 +1 @@ +int func(void) { return 933; } diff --git a/test cases/common/8 install/test.json b/test cases/common/8 install/test.json new file mode 100644 index 0000000..b31f287 --- /dev/null +++ b/test cases/common/8 install/test.json @@ -0,0 +1,9 @@ +{ + "installed": [ + { "type": "exe", "file": "usr/bin/prog" }, + { "type": "pdb", "file": "usr/bin/prog" }, + { "type": "file", "file": "usr/share/dir/file.txt" }, + { "type": "file", "file": "usr/libtest/libstat.a" } + ], + "do_not_set_opts": ["libdir"] +} |