aboutsummaryrefslogtreecommitdiff
path: root/run_project_tests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-01-09 22:08:00 +0200
committerGitHub <noreply@github.com>2018-01-09 22:08:00 +0200
commitdfd368d4054bfe067545112717a5bd21bc37aca7 (patch)
tree0de531ef07c66ae08e527f24b757a89ec399396f /run_project_tests.py
parentde8018a17d9b84b2a57761ad624cc669c4e136a4 (diff)
parent62fc6e7412ec340b230e604437eb67861553bb91 (diff)
downloadmeson-dfd368d4054bfe067545112717a5bd21bc37aca7.zip
meson-dfd368d4054bfe067545112717a5bd21bc37aca7.tar.gz
meson-dfd368d4054bfe067545112717a5bd21bc37aca7.tar.bz2
Merge pull request #2803 from dcbaker/wip/freebsd-fixes
various BSD fixes
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-xrun_project_tests.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index 74e4ca7..d191e28 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -448,20 +448,28 @@ def have_objc_compiler():
env = environment.Environment(None, build_dir, None, get_fake_options('/'), [])
try:
objc_comp = env.detect_objc_compiler(False)
- except:
+ except mesonlib.MesonException:
return False
if not objc_comp:
return False
try:
objc_comp.sanity_check(env.get_scratch_dir(), env)
- objcpp_comp = env.detect_objc_compiler(False)
- except:
+ except mesonlib.MesonException:
+ return False
+ return True
+
+def have_objcpp_compiler():
+ with AutoDeletedDir(tempfile.mkdtemp(prefix='b ', dir='.')) as build_dir:
+ env = environment.Environment(None, build_dir, None, get_fake_options('/'), [])
+ try:
+ objcpp_comp = env.detect_objcpp_compiler(False)
+ except mesonlib.MesonException:
return False
if not objcpp_comp:
return False
try:
objcpp_comp.sanity_check(env.get_scratch_dir(), env)
- except:
+ except mesonlib.MesonException:
return False
return True
@@ -488,6 +496,7 @@ def detect_tests_to_run():
('rust', 'rust', backend is not Backend.ninja or not shutil.which('rustc')),
('d', 'd', backend is not Backend.ninja or not have_d_compiler()),
('objective c', 'objc', backend not in (Backend.ninja, Backend.xcode) or mesonlib.is_windows() or not have_objc_compiler()),
+ ('objective c++', 'objcpp', backend not in (Backend.ninja, Backend.xcode) or mesonlib.is_windows() or not have_objcpp_compiler()),
('fortran', 'fortran', backend is not Backend.ninja or not shutil.which('gfortran')),
('swift', 'swift', backend not in (Backend.ninja, Backend.xcode) or not shutil.which('swiftc')),
('python3', 'python3', backend is not Backend.ninja),