Require CMake 3.14 for all tests that use the cmake module

Older versions are not supported by the cmake module since 0.62.

This avoids having to hard-code the linux-bionic-gcc CI job as being
unable to run these tests, which leaves other older environments like
Debian 10 still trying to run them (and failing).

Signed-off-by: Simon McVittie <smcv@collabora.com>
pull/10385/head
Simon McVittie 3 years ago committed by Eli Schwartz
parent 7650f32828
commit 65ea833d58
  1. 6
      run_project_tests.py
  2. 5
      test cases/cmake/11 cmake_module_path/test.json
  3. 5
      test cases/cmake/19 advanced options/test.json
  4. 5
      test cases/cmake/2 advanced/test.json
  5. 5
      test cases/cmake/3 advanced no dep/test.json
  6. 4
      test cases/unit/84 nested subproject regenerate depends/meson.build
  7. 2
      unittests/allplatformstests.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),

@ -1,5 +0,0 @@
{
"tools": {
"cmake": ">=3.12"
}
}

@ -1,8 +1,5 @@
{
"installed": [
{"type": "exe", "file": "usr/bin/testEXE"}
],
"tools": {
"cmake": ">=3.11"
}
]
}

@ -1,8 +1,5 @@
{
"installed": [
{"type": "exe", "file": "usr/bin/testEXE"}
],
"tools": {
"cmake": ">=3.11"
}
]
}

@ -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"
}
]
}

@ -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

@ -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)

Loading…
Cancel
Save