diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-10-27 19:56:09 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-06-09 20:37:26 -0400 |
commit | c151988b397e15d67d83047a2e33d3df28353987 (patch) | |
tree | 0c57783bd8b7c9fda2d86ad8f598fa6593f70379 /unittests | |
parent | e8a3f4d38c49ae7a937e0a02db06a73f5593b08f (diff) | |
download | meson-c151988b397e15d67d83047a2e33d3df28353987.zip meson-c151988b397e15d67d83047a2e33d3df28353987.tar.gz meson-c151988b397e15d67d83047a2e33d3df28353987.tar.bz2 |
intro-install_plan: fix destinations for build_targets with custom install_dir
There are a couple issues that combine to make the current handling a
bit confusing.
- we call it "install_dir_name" but it is only ever the class default
- CustomTarget always has it set to None, and then we check if it is
None then create a different variable with a safe fallback. The if is
useless -- it cannot fail, but if it did we'd get an undefined
variable error when we tried to use `dir_name`
Remove the special handling for CustomTarget. Instead, just always
accept None as a possible value of outdir_name when constructing install
data, and, if it is None, fall back to {prefix}/outdir regardless of
what type it used to be.
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/allplatformstests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 71e919e..6e2f22d 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -3961,6 +3961,8 @@ class AllPlatformTests(BasePlatformTests): Path(installpath, 'usr/lib/bothcustom.lib'), Path(installpath, 'usr/lib/shared.lib'), Path(installpath, 'usr/lib/versioned_shared.lib'), + Path(installpath, 'usr/otherbin'), + Path(installpath, 'usr/otherbin/app-otherdir.pdb'), } elif is_windows() or is_cygwin(): expected_devel |= { @@ -3978,6 +3980,8 @@ class AllPlatformTests(BasePlatformTests): expected_runtime = expected_common | { Path(installpath, 'usr/bin'), Path(installpath, 'usr/bin/' + exe_name('app')), + Path(installpath, 'usr/otherbin'), + Path(installpath, 'usr/otherbin/' + exe_name('app-otherdir')), Path(installpath, 'usr/bin/' + exe_name('app2')), Path(installpath, 'usr/' + shared_lib_name('shared')), Path(installpath, 'usr/' + shared_lib_name('both')), @@ -4086,6 +4090,10 @@ class AllPlatformTests(BasePlatformTests): 'destination': '{bindir}/' + exe_name('app'), 'tag': 'runtime', }, + f'{self.builddir}/' + exe_name('app-otherdir'): { + 'destination': '{prefix}/otherbin/' + exe_name('app-otherdir'), + 'tag': 'runtime', + }, f'{self.builddir}/subdir/' + exe_name('app2'): { 'destination': '{bindir}/' + exe_name('app2'), 'tag': 'runtime', |