diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2017-04-04 12:35:24 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2017-04-06 22:47:15 +0100 |
commit | 5af98a5ee8e8065932e9ebcaa45dd6fd42a54bdf (patch) | |
tree | 5b2dccd4e43de6fa1f7314490bd2b9b92fc2aef5 /run_project_tests.py | |
parent | 600f16f9f834f14ff411b477674b6112cbac33d1 (diff) | |
download | meson-5af98a5ee8e8065932e9ebcaa45dd6fd42a54bdf.zip meson-5af98a5ee8e8065932e9ebcaa45dd6fd42a54bdf.tar.gz meson-5af98a5ee8e8065932e9ebcaa45dd6fd42a54bdf.tar.bz2 |
Use correct shared library naming for Cygwin
Use correct shared library naming for Cygwin when building and installing
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-x | run_project_tests.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index 28de638..a6cada3 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -31,6 +31,7 @@ import xml.etree.ElementTree as ET import time import multiprocessing import concurrent.futures as conc +import re from mesonbuild.coredata import backendlist @@ -208,12 +209,18 @@ def get_relative_files_list_from_dir(fromdir): paths.append(path) return paths -def platform_fix_exe_name(fname): - if not fname.endswith('?exe'): - return fname - fname = fname[:-4] - if mesonlib.is_windows(): - return fname + '.exe' +def platform_fix_name(fname): + if '?lib' in fname: + if mesonlib.is_cygwin(): + fname = re.sub(r'\?lib(.*)\.dll$', r'cyg\1.dll', fname) + else: + fname = re.sub(r'\?lib', 'lib', fname) + + if fname.endswith('?exe'): + fname = fname[:-4] + if mesonlib.is_windows(): + return fname + '.exe' + return fname def validate_install(srcdir, installdir): @@ -230,7 +237,7 @@ def validate_install(srcdir, installdir): elif os.path.exists(info_file): with open(info_file) as f: for line in f: - expected[platform_fix_exe_name(line.strip())] = False + expected[platform_fix_name(line.strip())] = False # Check if expected files were found for fname in expected: if os.path.exists(os.path.join(installdir, fname)): |