diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-08-11 01:03:31 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-08-11 01:03:31 +0300 |
commit | fcbe6895614df62c2035559e276bb538d5770098 (patch) | |
tree | fcd7175567ae464f6b5f4e545de57b12f5741c51 | |
parent | 47b60fb10e5d6ab7351f0a95fa2a6d5ff2b428ce (diff) | |
download | meson-fcbe6895614df62c2035559e276bb538d5770098.zip meson-fcbe6895614df62c2035559e276bb538d5770098.tar.gz meson-fcbe6895614df62c2035559e276bb538d5770098.tar.bz2 |
Check if executables need to be run with Mono.
-rwxr-xr-x | meson_test.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meson_test.py b/meson_test.py index c6b3517..1584ee5 100755 --- a/meson_test.py +++ b/meson_test.py @@ -17,6 +17,7 @@ import sys, os, subprocess, time, datetime, pickle, multiprocessing, json import concurrent.futures as conc from optparse import OptionParser +import platform tests_failed = False @@ -50,10 +51,17 @@ def write_json_log(jsonlogfile, test_name, result): 'returncode' : result.returncode} jsonlogfile.write(json.dumps(result) + '\n') +def run_with_mono(fname): + if fname.endswith('.exe') and not platform.system().lower() == 'windows': + return True + return False + def run_single_test(wrap, test): global tests_failed if test.fname.endswith('.jar'): cmd = ['java', '-jar', test.fname] + elif run_with_mono(test.fname): + cmd = ['mono', test.fname] else: if test.is_cross: if test.exe_runner is None: |