From 260d6eaa6e630e4c90a1c9c6e8cc58116cdc59e4 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 15 Sep 2013 22:20:41 +0300 Subject: Mangle install file names so test suite passes on OSX. --- run_tests.py | 11 +++++++++-- 1 file 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:] -- cgit v1.1