From fcbe6895614df62c2035559e276bb538d5770098 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 11 Aug 2014 01:03:31 +0300 Subject: [PATCH] Check if executables need to be run with Mono. --- meson_test.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meson_test.py b/meson_test.py index c6b35171e..1584ee581 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: