diff --git a/run_project_tests.py b/run_project_tests.py index 3e1a4d155..7cbce64d5 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -1061,6 +1061,10 @@ def detect_tests_to_run(only: T.Dict[str, T.List[str]], use_tmp: bool) -> T.List shutil.which('nagfor') or shutil.which('ifort')) + skip_cmake = ((os.environ.get('compiler') == 'msvc2015' and under_ci) or + 'cmake' not in tool_vers_map or + not mesonlib.version_compare(tool_vers_map['cmake'], '>=3.14')) + class TestCategory: def __init__(self, category: str, subdir: str, skip: bool = False, stdout_mandatory: bool = False): self.category = category # category name @@ -1069,7 +1073,7 @@ def detect_tests_to_run(only: T.Dict[str, T.List[str]], use_tmp: bool) -> T.List self.stdout_mandatory = stdout_mandatory # expected stdout is mandatory for tests in this category all_tests = [ - TestCategory('cmake', 'cmake', not shutil.which('cmake') or (os.environ.get('compiler') == 'msvc2015' and under_ci) or (os.environ.get('MESON_CI_JOBNAME') == 'linux-bionic-gcc')), + TestCategory('cmake', 'cmake', skip_cmake), TestCategory('common', 'common'), TestCategory('native', 'native'), TestCategory('warning-meson', 'warning', stdout_mandatory=True), diff --git a/test cases/cmake/11 cmake_module_path/test.json b/test cases/cmake/11 cmake_module_path/test.json deleted file mode 100644 index 79a2b60d3..000000000 --- a/test cases/cmake/11 cmake_module_path/test.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "tools": { - "cmake": ">=3.12" - } -} diff --git a/test cases/cmake/19 advanced options/test.json b/test cases/cmake/19 advanced options/test.json index 71ea812c7..29888eae2 100644 --- a/test cases/cmake/19 advanced options/test.json +++ b/test cases/cmake/19 advanced options/test.json @@ -1,8 +1,5 @@ { "installed": [ {"type": "exe", "file": "usr/bin/testEXE"} - ], - "tools": { - "cmake": ">=3.11" - } + ] } diff --git a/test cases/cmake/2 advanced/test.json b/test cases/cmake/2 advanced/test.json index 71ea812c7..29888eae2 100644 --- a/test cases/cmake/2 advanced/test.json +++ b/test cases/cmake/2 advanced/test.json @@ -1,8 +1,5 @@ { "installed": [ {"type": "exe", "file": "usr/bin/testEXE"} - ], - "tools": { - "cmake": ">=3.11" - } + ] } diff --git a/test cases/cmake/3 advanced no dep/test.json b/test cases/cmake/3 advanced no dep/test.json index c27ed82e4..e75e54a7e 100644 --- a/test cases/cmake/3 advanced no dep/test.json +++ b/test cases/cmake/3 advanced no dep/test.json @@ -4,8 +4,5 @@ {"type": "exe", "file": "usr/bin/cm_meson_testEXE"}, {"type": "pdb", "file": "usr/bin/cm_benchmark"}, {"type": "exe", "file": "usr/bin/cm_benchmark"} - ], - "tools": { - "cmake": ">=3.11" - } + ] } diff --git a/test cases/unit/84 nested subproject regenerate depends/meson.build b/test cases/unit/84 nested subproject regenerate depends/meson.build index 569888164..a8d213887 100644 --- a/test cases/unit/84 nested subproject regenerate depends/meson.build +++ b/test cases/unit/84 nested subproject regenerate depends/meson.build @@ -1,5 +1,9 @@ project('nested subproject regenerate depends', 'c') +if not find_program('cmake', required: false, version: '>=3.14').found() + error('MESON_SKIP_TEST cmake >= 3.14 not available.') +endif + s = subproject('sub1') # This is needed to make msbuild noop check work correctly diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 8425cf539..f0e27e91a 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -3740,8 +3740,6 @@ class AllPlatformTests(BasePlatformTests): # This checks a bug where if a non-meson project is used as a third # level (or deeper) subproject it doesn't cause a rebuild if the build # files for that project are changed - if os.environ.get('MESON_CI_JOBNAME') == 'linux-bionic-gcc': - raise SkipTest('Unsupported CMake version') testdir = os.path.join(self.unit_test_dir, '84 nested subproject regenerate depends') cmakefile = Path(testdir) / 'subprojects' / 'sub2' / 'CMakeLists.txt' self.init(testdir)