diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-03-06 09:49:47 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-03-06 12:11:26 -0800 |
commit | 2cdc6892f4cb28d82e878c570e2f39361aee7cad (patch) | |
tree | 7e9ab9d9f806cf27f4b5f3a24a460488f541ba96 /run_project_tests.py | |
parent | f404c679cf292e6a7cf3886cd94511602c1c09f9 (diff) | |
download | meson-2cdc6892f4cb28d82e878c570e2f39361aee7cad.zip meson-2cdc6892f4cb28d82e878c570e2f39361aee7cad.tar.gz meson-2cdc6892f4cb28d82e878c570e2f39361aee7cad.tar.bz2 |
project_tests: Add a "shared_lib" type
This allows fixing tests that produce .dylib's on macOS and .so's on elf
Unices.
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-x | run_project_tests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index 86db599..d63dd38 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -114,6 +114,15 @@ class InstalledFile: # Handle the different types if self.typ == 'file': return p + elif self.typ == 'shared_lib': + if env.machines.host.is_windows() or env.machines.host.is_cygwin(): + return p.with_suffix('.dll') + + p = p.with_name('lib{}'.format(p.name)) + if env.machines.host.is_darwin(): + return p.with_suffix('.dylib') + else: + return p.with_suffix('.so') elif self.typ == 'exe': if env.machines.host.is_windows() or env.machines.host.is_cygwin(): return p.with_suffix('.exe') |