diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-09-15 22:20:41 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-09-15 22:20:41 +0300 |
commit | 260d6eaa6e630e4c90a1c9c6e8cc58116cdc59e4 (patch) | |
tree | ef144ef85a39aa6a4242ef8ca9eafdfbf04c5f27 | |
parent | 26837fda4813fc4c1c19a7a092738cf2c7184da2 (diff) | |
download | meson-260d6eaa6e630e4c90a1c9c6e8cc58116cdc59e4.zip meson-260d6eaa6e630e4c90a1c9c6e8cc58116cdc59e4.tar.gz meson-260d6eaa6e630e4c90a1c9c6e8cc58116cdc59e4.tar.bz2 |
Mangle install file names so test suite passes on OSX.
-rwxr-xr-x | run_tests.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/run_tests.py b/run_tests.py index 7ec3bd4..411059a 100755 --- a/run_tests.py +++ b/run_tests.py @@ -15,7 +15,7 @@ # limitations under the License. from glob import glob -import os, subprocess, shutil, sys +import os, subprocess, shutil, sys, platform import environment test_build_dir = 'work area' @@ -30,13 +30,20 @@ if True: # Currently we have only one backend. test_commands = [ninja_command, 'test'] install_commands = [ninja_command, 'install'] +def platform_fix_filename(fname): + if platform.system() == 'Darwin': + if fname.endswith('.so'): + return fname[:-2] + 'dylib' + return fname.replace('.so.', '.dylib.') + return fname + def validate_install(srcdir, installdir): info_file = os.path.join(srcdir, 'installed_files.txt') expected = {} found = {} if os.path.exists(info_file): for line in open(info_file): - expected[line.strip()] = True + expected[platform_fix_filename(line.strip())] = True for root, dirs, files in os.walk(installdir): for fname in files: found_name = os.path.join(root, fname)[len(installdir)+1:] |