aboutsummaryrefslogtreecommitdiff
path: root/mesontest.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-04-09 22:25:08 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2017-04-09 22:54:27 +0300
commit4c6f99a31adef341a5d71af28ce26452e4a5f182 (patch)
tree4fde058f28f21a2c97f23161cce43704ac3dc411 /mesontest.py
parent0b772f37c0b4a9a7759e70f6f57abdc2e0a394c6 (diff)
downloadmeson-4c6f99a31adef341a5d71af28ce26452e4a5f182.zip
meson-4c6f99a31adef341a5d71af28ce26452e4a5f182.tar.gz
meson-4c6f99a31adef341a5d71af28ce26452e4a5f182.tar.bz2
Check that requested executables are available. Closes #1591.
Diffstat (limited to 'mesontest.py')
-rwxr-xr-xmesontest.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/mesontest.py b/mesontest.py
index c4d1178..38fd73b 100755
--- a/mesontest.py
+++ b/mesontest.py
@@ -21,6 +21,7 @@ import subprocess, sys, os, argparse
import pickle
from mesonbuild import build
from mesonbuild import environment
+from mesonbuild.dependencies import ExternalProgram
import time, datetime, multiprocessing, json
import concurrent.futures as conc
@@ -574,12 +575,21 @@ def run(args):
print('Can not be both quiet and verbose at the same time.')
return 1
+ check_bin = None
if options.gdb:
options.verbose = True
if options.wrapper:
print('Must not specify both a wrapper and gdb at the same time.')
return 1
+ check_bin = 'gdb'
+ if options.wrapper:
+ check_bin = options.wrapper[0]
+
+ if check_bin is not None:
+ exe = ExternalProgram(check_bin, silent=True)
+ if not exe.found():
+ sys.exit("Could not find requested program: %s" % check_bin)
options.wd = os.path.abspath(options.wd)
if not options.no_rebuild: