diff options
Diffstat (limited to 'run_tests.py')
-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:] |