aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrun_project_tests.py8
-rwxr-xr-xrun_tests.py6
2 files changed, 7 insertions, 7 deletions
diff --git a/run_project_tests.py b/run_project_tests.py
index d517fd3..14f3c59 100755
--- a/run_project_tests.py
+++ b/run_project_tests.py
@@ -611,10 +611,8 @@ def detect_tests_to_run(only: List[str]) -> List[Tuple[str, List[Path], bool]]:
tests to run
"""
- ninja_fortran_compiler = shutil.which('gfortran') or shutil.which('flang') or shutil.which('pgfortran') or (not mesonlib.is_windows() and shutil.which('ifort'))
- ninja_fortran = backend is Backend.ninja and ninja_fortran_compiler
- vs_fortran = mesonlib.is_windows() and backend is Backend.vs and shutil.which('ifort')
- skip_fortran = not(ninja_fortran or vs_fortran)
+ skip_fortran = not(shutil.which('gfortran') or shutil.which('flang') or
+ shutil.which('pgfortran') or shutil.which('ifort'))
# Name, subdirectory, skip condition.
all_tests = [
@@ -637,7 +635,7 @@ def detect_tests_to_run(only: List[str]) -> List[Tuple[str, List[Path], bool]]:
('d', 'd', backend is not Backend.ninja or not have_d_compiler()),
('objective c', 'objc', backend not in (Backend.ninja, Backend.xcode) or not have_objc_compiler()),
('objective c++', 'objcpp', backend not in (Backend.ninja, Backend.xcode) or not have_objcpp_compiler()),
- ('fortran', 'fortran', skip_fortran),
+ ('fortran', 'fortran', skip_fortran or backend != Backend.ninja),
('swift', 'swift', backend not in (Backend.ninja, Backend.xcode) or not shutil.which('swiftc')),
('cuda', 'cuda', backend not in (Backend.ninja, Backend.xcode) or not shutil.which('nvcc')),
('python3', 'python3', backend is not Backend.ninja),
diff --git a/run_tests.py b/run_tests.py
index 38c65c5..f91ec85 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -34,11 +34,13 @@ from mesonbuild import mlog
from mesonbuild.environment import Environment, detect_ninja
from mesonbuild.coredata import backendlist
-def guess_backend(backend, msbuild_exe):
+def guess_backend(backend, msbuild_exe: str):
# Auto-detect backend if unspecified
backend_flags = []
if backend is None:
- if msbuild_exe is not None and mesonlib.is_windows():
+ if (msbuild_exe is not None and
+ mesonlib.is_windows() and not
+ (os.environ.get('CC') == 'icl' or os.environ.get('CXX') == 'icl' or os.environ.get('FC') == 'ifort')) :
backend = 'vs' # Meson will auto-detect VS version to use
else:
backend = 'ninja'