aboutsummaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-04-20 22:04:58 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-04-20 22:04:58 +0300
commita92fcb711b5b56ee6858d73dc90eda0e1e5d91a4 (patch)
tree66bafc02688a61e7c30dfcd78398a2d27d525082 /run_tests.py
parent7df7b62ee797b2c010616b43982f23cb259b1655 (diff)
downloadmeson-a92fcb711b5b56ee6858d73dc90eda0e1e5d91a4.zip
meson-a92fcb711b5b56ee6858d73dc90eda0e1e5d91a4.tar.gz
meson-a92fcb711b5b56ee6858d73dc90eda0e1e5d91a4.tar.bz2
Fix windows tests when using newer MinGW.
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/run_tests.py b/run_tests.py
index 79c17cd..69898e7 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -288,7 +288,13 @@ def generate_prebuilt_object():
objectfile = objectbase + 'obj'
else:
objectfile = objectbase + 'o'
- cmd = ['cc', '-c', source, '-o', objectfile]
+ if shutil.which('cc'):
+ cmd = 'cc'
+ elif shutil.which('gcc'):
+ cmd = 'gcc'
+ else:
+ raise RuntimeError("Could not find C compiler.")
+ cmd = [cmd, '-c', source, '-o', objectfile]
subprocess.check_call(cmd)
return objectfile