aboutsummaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDaniele Nicolodi <daniele@grinta.net>2023-06-26 16:24:53 +0200
committerEli Schwartz <eschwartz93@gmail.com>2023-07-26 13:30:49 -0400
commit9eb7fe332f6a6a8babd040b76ad2a6808faf0423 (patch)
treec52b1c241f7f77e2e2beee8281c50ec39e32c569 /unittests
parenta0f165b2fa57653a44c97398c00c453ec28e6dcc (diff)
downloadmeson-9eb7fe332f6a6a8babd040b76ad2a6808faf0423.zip
meson-9eb7fe332f6a6a8babd040b76ad2a6808faf0423.tar.gz
meson-9eb7fe332f6a6a8babd040b76ad2a6808faf0423.tar.bz2
Fix install_data() default install path
This fixes two issues in constructing the default installation path when install_dir is not specified: - inside a subproject, install_data() would construct the destination path using the parent project name instead than the current project name, - when specifying preserve_path, install_data() would construct the destination path omitting the project name. Fixes #11910.
Diffstat (limited to 'unittests')
-rw-r--r--unittests/allplatformstests.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py
index baf5875..5a6e88b 100644
--- a/unittests/allplatformstests.py
+++ b/unittests/allplatformstests.py
@@ -4130,7 +4130,8 @@ class AllPlatformTests(BasePlatformTests):
]
bar_expected = [
'bar',
- 'share/foo/bar.dat',
+ 'share/bar',
+ 'share/bar/bar.dat',
'include/bar.h',
'bin/bar' + exe_suffix,
'bar/barfile'
@@ -4410,9 +4411,9 @@ class AllPlatformTests(BasePlatformTests):
Path(installpath, 'usr/share/foo2.h'),
Path(installpath, 'usr/share/out1.txt'),
Path(installpath, 'usr/share/out2.txt'),
- Path(installpath, 'usr/share/install tag'),
- Path(installpath, 'usr/share/install tag/aaa.txt'),
- Path(installpath, 'usr/share/install tag/bbb.txt'),
+ Path(installpath, 'usr/share/subproject'),
+ Path(installpath, 'usr/share/subproject/aaa.txt'),
+ Path(installpath, 'usr/share/subproject/bbb.txt'),
}
def do_install(tags, expected_files, expected_scripts):
@@ -4613,12 +4614,12 @@ class AllPlatformTests(BasePlatformTests):
'subproject': None,
},
f'{testdir}/subprojects/subproject/aaa.txt': {
- 'destination': '{datadir}/install tag/aaa.txt',
+ 'destination': '{datadir}/subproject/aaa.txt',
'tag': None,
'subproject': 'subproject',
},
f'{testdir}/subprojects/subproject/bbb.txt': {
- 'destination': '{datadir}/install tag/bbb.txt',
+ 'destination': '{datadir}/subproject/bbb.txt',
'tag': 'data',
'subproject': 'subproject',
},