aboutsummaryrefslogtreecommitdiff
path: root/meson_test.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-08-11 01:03:31 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-08-11 01:03:31 +0300
commitfcbe6895614df62c2035559e276bb538d5770098 (patch)
treefcd7175567ae464f6b5f4e545de57b12f5741c51 /meson_test.py
parent47b60fb10e5d6ab7351f0a95fa2a6d5ff2b428ce (diff)
downloadmeson-fcbe6895614df62c2035559e276bb538d5770098.zip
meson-fcbe6895614df62c2035559e276bb538d5770098.tar.gz
meson-fcbe6895614df62c2035559e276bb538d5770098.tar.bz2
Check if executables need to be run with Mono.
Diffstat (limited to 'meson_test.py')
-rwxr-xr-xmeson_test.py8
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: