diff options
| author | Eli Schwartz <eschwartz@archlinux.org> | 2022-06-19 16:04:48 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-07-08 01:58:23 -0400 |
| commit | e7d87b6f58c653c3962479f59867397ffc15c32f (patch) | |
| tree | 61e39ad22650fbe94d5bdb9c9b2edd263aa14dc3 /test cases | |
| parent | b89451847af56dc5f224a0e09605ad965d58aabe (diff) | |
| download | meson-e7d87b6f58c653c3962479f59867397ffc15c32f.tar.gz | |
implement the new preserve_path kwarg for install_data too
Primarily interesting to me because it is then available for the python
module's install_sources method.
Based on the new feature in install_headers.
Diffstat (limited to 'test cases')
31 files changed, 69 insertions, 0 deletions
diff --git a/test cases/common/252 install data structured/dir1/bad b/test cases/common/252 install data structured/dir1/bad new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir1/bad diff --git a/test cases/common/252 install data structured/dir1/file1 b/test cases/common/252 install data structured/dir1/file1 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir1/file1 diff --git a/test cases/common/252 install data structured/dir1/file2 b/test cases/common/252 install data structured/dir1/file2 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir1/file2 diff --git a/test cases/common/252 install data structured/dir1/file3 b/test cases/common/252 install data structured/dir1/file3 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir1/file3 diff --git a/test cases/common/252 install data structured/dir2/bad b/test cases/common/252 install data structured/dir2/bad new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir2/bad diff --git a/test cases/common/252 install data structured/dir2/file1 b/test cases/common/252 install data structured/dir2/file1 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir2/file1 diff --git a/test cases/common/252 install data structured/dir2/file2 b/test cases/common/252 install data structured/dir2/file2 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir2/file2 diff --git a/test cases/common/252 install data structured/dir2/file3 b/test cases/common/252 install data structured/dir2/file3 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir2/file3 diff --git a/test cases/common/252 install data structured/dir3/bad b/test cases/common/252 install data structured/dir3/bad new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir3/bad diff --git a/test cases/common/252 install data structured/dir3/file1 b/test cases/common/252 install data structured/dir3/file1 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir3/file1 diff --git a/test cases/common/252 install data structured/dir3/file2 b/test cases/common/252 install data structured/dir3/file2 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir3/file2 diff --git a/test cases/common/252 install data structured/dir3/file3 b/test cases/common/252 install data structured/dir3/file3 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/common/252 install data structured/dir3/file3 diff --git a/test cases/common/252 install data structured/meson.build b/test cases/common/252 install data structured/meson.build new file mode 100644 index 000000000..9d297943f --- /dev/null +++ b/test cases/common/252 install data structured/meson.build @@ -0,0 +1,16 @@ +project('install structured data') + +install_data( + 'dir1/file1', + 'dir1/file2', + 'dir1/file3', + 'dir2/file1', + 'dir2/file2', + 'dir2/file3', + 'dir3/file1', + 'dir3/file2', + 'dir3/file3', + install_dir: get_option('datadir'), + preserve_path: true, +) +subdir('pysrc') diff --git a/test cases/common/252 install data structured/pysrc/__init__.py b/test cases/common/252 install data structured/pysrc/__init__.py new file mode 100644 index 000000000..cb831ca1b --- /dev/null +++ b/test cases/common/252 install data structured/pysrc/__init__.py @@ -0,0 +1 @@ +'''init for mod''' diff --git a/test cases/common/252 install data structured/pysrc/bad.py b/test cases/common/252 install data structured/pysrc/bad.py new file mode 100644 index 000000000..d2f862ea0 --- /dev/null +++ b/test cases/common/252 install data structured/pysrc/bad.py @@ -0,0 +1 @@ +'''mod.bad should not be installed''' diff --git a/test cases/common/252 install data structured/pysrc/bar.py b/test cases/common/252 install data structured/pysrc/bar.py new file mode 100644 index 000000000..1ac5d08e6 --- /dev/null +++ b/test cases/common/252 install data structured/pysrc/bar.py @@ -0,0 +1 @@ +'''mod.bar module''' diff --git a/test cases/common/252 install data structured/pysrc/foo.py b/test cases/common/252 install data structured/pysrc/foo.py new file mode 100644 index 000000000..eff906b23 --- /dev/null +++ b/test cases/common/252 install data structured/pysrc/foo.py @@ -0,0 +1 @@ +'''mod.foo module''' diff --git a/test cases/common/252 install data structured/pysrc/meson.build b/test cases/common/252 install data structured/pysrc/meson.build new file mode 100644 index 000000000..64c0f4dc1 --- /dev/null +++ b/test cases/common/252 install data structured/pysrc/meson.build @@ -0,0 +1,11 @@ +py_inst = import('python').find_installation() + +py_inst.install_sources( + '__init__.py', + 'foo.py', + 'bar.py', + 'submod/__init__.py', + 'submod/baz.py', + subdir: 'mod', + preserve_path: true, +) diff --git a/test cases/common/252 install data structured/pysrc/submod/__init__.py b/test cases/common/252 install data structured/pysrc/submod/__init__.py new file mode 100644 index 000000000..65a3500cd --- /dev/null +++ b/test cases/common/252 install data structured/pysrc/submod/__init__.py @@ -0,0 +1 @@ +'''init for submod''' diff --git a/test cases/common/252 install data structured/pysrc/submod/bad.py b/test cases/common/252 install data structured/pysrc/submod/bad.py new file mode 100644 index 000000000..6661a6d11 --- /dev/null +++ b/test cases/common/252 install data structured/pysrc/submod/bad.py @@ -0,0 +1 @@ +'''mod.submod.bad should not be installed''' diff --git a/test cases/common/252 install data structured/pysrc/submod/baz.py b/test cases/common/252 install data structured/pysrc/submod/baz.py new file mode 100644 index 000000000..d0b290440 --- /dev/null +++ b/test cases/common/252 install data structured/pysrc/submod/baz.py @@ -0,0 +1 @@ +'''mod.submod.baz module''' diff --git a/test cases/common/252 install data structured/test.json b/test cases/common/252 install data structured/test.json new file mode 100644 index 000000000..f4dc2dff1 --- /dev/null +++ b/test cases/common/252 install data structured/test.json @@ -0,0 +1,18 @@ +{ + "installed": [ + {"type": "python_file", "file": "usr/@PYTHON_PURELIB@/mod/__init__.py"}, + {"type": "python_file", "file": "usr/@PYTHON_PURELIB@/mod/foo.py"}, + {"type": "python_file", "file": "usr/@PYTHON_PURELIB@/mod/bar.py"}, + {"type": "python_file", "file": "usr/@PYTHON_PURELIB@/mod/submod/__init__.py"}, + {"type": "python_file", "file": "usr/@PYTHON_PURELIB@/mod/submod/baz.py"}, + {"type": "file", "file": "usr/share/dir1/file1"}, + {"type": "file", "file": "usr/share/dir1/file2"}, + {"type": "file", "file": "usr/share/dir1/file3"}, + {"type": "file", "file": "usr/share/dir2/file1"}, + {"type": "file", "file": "usr/share/dir2/file2"}, + {"type": "file", "file": "usr/share/dir2/file3"}, + {"type": "file", "file": "usr/share/dir3/file1"}, + {"type": "file", "file": "usr/share/dir3/file2"}, + {"type": "file", "file": "usr/share/dir3/file3"} + ] +} diff --git a/test cases/python/7 install path/meson.build b/test cases/python/7 install path/meson.build index 4a7df7eca..5f0f7dfc6 100644 --- a/test cases/python/7 install path/meson.build +++ b/test cases/python/7 install path/meson.build @@ -8,3 +8,5 @@ project('install path', py = import('python').find_installation() py.install_sources('test.py') py.install_sources('test.py', pure: false) + +subdir('structured') diff --git a/test cases/python/7 install path/structured/alpha/one.py b/test cases/python/7 install path/structured/alpha/one.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/python/7 install path/structured/alpha/one.py diff --git a/test cases/python/7 install path/structured/alpha/three.py b/test cases/python/7 install path/structured/alpha/three.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/python/7 install path/structured/alpha/three.py diff --git a/test cases/python/7 install path/structured/alpha/two.py b/test cases/python/7 install path/structured/alpha/two.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/python/7 install path/structured/alpha/two.py diff --git a/test cases/python/7 install path/structured/beta/one.py b/test cases/python/7 install path/structured/beta/one.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/python/7 install path/structured/beta/one.py diff --git a/test cases/python/7 install path/structured/meson.build b/test cases/python/7 install path/structured/meson.build new file mode 100644 index 000000000..6c8558799 --- /dev/null +++ b/test cases/python/7 install path/structured/meson.build @@ -0,0 +1,9 @@ +py.install_sources( + 'one.py', + 'two.py', + 'alpha/one.py', + 'alpha/two.py', + 'alpha/three.py', + 'beta/one.py', + preserve_path: true, +) diff --git a/test cases/python/7 install path/structured/one.py b/test cases/python/7 install path/structured/one.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/python/7 install path/structured/one.py diff --git a/test cases/python/7 install path/structured/two.py b/test cases/python/7 install path/structured/two.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test cases/python/7 install path/structured/two.py diff --git a/test cases/python/7 install path/test.json b/test cases/python/7 install path/test.json index f03ada809..9b05b6665 100644 --- a/test cases/python/7 install path/test.json +++ b/test cases/python/7 install path/test.json @@ -1,5 +1,11 @@ { "installed": [ + {"type": "file", "file": "pure/one.py"}, + {"type": "file", "file": "pure/two.py"}, + {"type": "file", "file": "pure/alpha/one.py"}, + {"type": "file", "file": "pure/alpha/two.py"}, + {"type": "file", "file": "pure/alpha/three.py"}, + {"type": "file", "file": "pure/beta/one.py"}, {"type": "file", "file": "plat/test.py"}, {"type": "file", "file": "pure/test.py"} ] |
