From 2cdc6892f4cb28d82e878c570e2f39361aee7cad Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 6 Mar 2020 09:49:47 -0800 Subject: project_tests: Add a "shared_lib" type This allows fixing tests that produce .dylib's on macOS and .so's on elf Unices. --- run_project_tests.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'run_project_tests.py') diff --git a/run_project_tests.py b/run_project_tests.py index 86db59961..d63dd38a3 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') -- cgit v1.3