diff options
author | Simon McVittie <smcv@collabora.com> | 2022-05-06 10:58:25 +0100 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-05-10 07:56:59 -0400 |
commit | 65ea833d58f5e4720b89e6f97b38cd7d61b48418 (patch) | |
tree | 78e555fa67e5d3585a5f6e6052634fcd32a7ceae | |
parent | 7650f328284f24c2f70dcfb1689ae8fc22c04cf1 (diff) | |
download | meson-65ea833d58f5e4720b89e6f97b38cd7d61b48418.zip meson-65ea833d58f5e4720b89e6f97b38cd7d61b48418.tar.gz meson-65ea833d58f5e4720b89e6f97b38cd7d61b48418.tar.bz2 |
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>
-rwxr-xr-x | run_project_tests.py | 6 | ||||
-rw-r--r-- | test cases/cmake/11 cmake_module_path/test.json | 5 | ||||
-rw-r--r-- | test cases/cmake/19 advanced options/test.json | 5 | ||||
-rw-r--r-- | test cases/cmake/2 advanced/test.json | 5 | ||||
-rw-r--r-- | test cases/cmake/3 advanced no dep/test.json | 5 | ||||
-rw-r--r-- | test cases/unit/84 nested subproject regenerate depends/meson.build | 4 | ||||
-rw-r--r-- | unittests/allplatformstests.py | 2 |
7 files changed, 12 insertions, 20 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index 3e1a4d1..7cbce64 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 79a2b60..0000000 --- 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 71ea812..29888ea 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 71ea812..29888ea 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 c27ed82..e75e54a 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 5698881..a8d2138 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 8425cf5..f0e27e9 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) |