diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-03-18 21:29:03 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2021-03-18 21:50:38 -0400 |
commit | f7b0238ed67fc0c9e3cef38090983e33b40fa205 (patch) | |
tree | 9dcd00030e33e1babc65d28fcf7f2bebd1b2b7fd /test cases | |
parent | 0ad870f3dc970e4cee8cafc47034abf973de4113 (diff) | |
download | meson-f7b0238ed67fc0c9e3cef38090983e33b40fa205.zip meson-f7b0238ed67fc0c9e3cef38090983e33b40fa205.tar.gz meson-f7b0238ed67fc0c9e3cef38090983e33b40fa205.tar.bz2 |
add test case for installed targets uninstalling a single directory
Diffstat (limited to 'test cases')
-rwxr-xr-x | test cases/common/8 install/gendir.py | 8 | ||||
-rw-r--r-- | test cases/common/8 install/meson.build | 6 | ||||
-rw-r--r-- | test cases/common/8 install/test.json | 7 |
3 files changed, 18 insertions, 3 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 index 12ad389..6eb5ba5 100644 --- a/test cases/common/8 install/meson.build +++ b/test cases/common/8 install/meson.build @@ -2,3 +2,9 @@ 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/test.json b/test cases/common/8 install/test.json index d2b1c63..b31f287 100644 --- a/test cases/common/8 install/test.json +++ b/test cases/common/8 install/test.json @@ -1,8 +1,9 @@ { "installed": [ - { "type": "exe", "file": "usr/bin/prog" }, - { "type": "pdb", "file": "usr/bin/prog" }, - { "type": "file", "file": "usr/libtest/libstat.a" } + { "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"] } |