From aee88e236379bd0c82e48509b6ba040ec96e32cb Mon Sep 17 00:00:00 2001 From: na-trium-144 <100704180+na-trium-144@users.noreply.github.com> Date: Sat, 8 Feb 2025 19:44:17 +0900 Subject: [PATCH] Enable test case common/230 on msys2 Implemented 'windows' and '!windows' as platform value in test configuration for this. In MSVC environment this test is ignored anyway since make command is not available. --- data/test.schema.json | 4 +++- docs/markdown/Contributing.md | 2 ++ run_project_tests.py | 2 ++ test cases/common/230 external project/libfoo/meson.build | 1 + test cases/common/230 external project/meson.build | 4 ---- test cases/common/230 external project/test.json | 4 ++-- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/data/test.schema.json b/data/test.schema.json index e87e7d03a..1fe60a694 100644 --- a/data/test.schema.json +++ b/data/test.schema.json @@ -43,7 +43,9 @@ "msvc", "gcc", "cygwin", - "!cygwin" + "!cygwin", + "windows", + "!windows" ] }, "version": { diff --git a/docs/markdown/Contributing.md b/docs/markdown/Contributing.md index 729dabf5c..0baad7896 100644 --- a/docs/markdown/Contributing.md +++ b/docs/markdown/Contributing.md @@ -320,6 +320,8 @@ considered if the platform matches. The following values for | `gcc` | Not `msvc` | | `cygwin` | Matches when the platform is cygwin | | `!cygwin` | Not `cygwin` | +| `windows` | Matches when the platform is windows or cygwin | +| `!windows` | Not `windows` | #### matrix diff --git a/run_project_tests.py b/run_project_tests.py index 1efe2104f..8526d7352 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -160,6 +160,8 @@ class InstalledFile: 'gcc': canonical_compiler != 'msvc', 'cygwin': env.machines.host.is_cygwin(), '!cygwin': not env.machines.host.is_cygwin(), + 'windows': env.machines.host.is_windows() or env.machines.host.is_cygwin(), + '!windows': not (env.machines.host.is_windows() or env.machines.host.is_cygwin()), }.get(self.platform or '', True) if not matches: return None diff --git a/test cases/common/230 external project/libfoo/meson.build b/test cases/common/230 external project/libfoo/meson.build index a2512aa6f..f69600c6e 100644 --- a/test cases/common/230 external project/libfoo/meson.build +++ b/test cases/common/230 external project/libfoo/meson.build @@ -17,6 +17,7 @@ p = mod.add_project('configure', '--libext=' + libext, ], depends: somelib, + verbose: true, ) libfoo_dep = declare_dependency(link_with : somelib, diff --git a/test cases/common/230 external project/meson.build b/test cases/common/230 external project/meson.build index d1ed797c4..386e52561 100644 --- a/test cases/common/230 external project/meson.build +++ b/test cases/common/230 external project/meson.build @@ -8,10 +8,6 @@ if not find_program('make', required : false).found() error('MESON_SKIP_TEST: make not found') endif -if host_machine.system() == 'windows' - error('MESON_SKIP_TEST: The fake configure script is too dumb to work on Windows') -endif - if meson.is_cross_build() # CI uses PKG_CONFIG_SYSROOT_DIR which breaks -uninstalled.pc usage. error('MESON_SKIP_TEST: Cross build support is too limited for this test') diff --git a/test cases/common/230 external project/test.json b/test cases/common/230 external project/test.json index 4df7d4ac5..ff8b55838 100644 --- a/test cases/common/230 external project/test.json +++ b/test cases/common/230 external project/test.json @@ -1,7 +1,7 @@ { "installed": [ - { "type": "shared_lib", "file": "usr/lib/foo", "platform": "!cygwin" }, - { "type": "file", "file": "usr/lib/libfoo.dll", "platform": "cygwin" }, + { "type": "shared_lib", "file": "usr/lib/foo", "platform": "!windows" }, + { "type": "file", "file": "usr/lib/libfoo.dll", "platform": "windows" }, { "type": "file", "file": "usr/include/libfoo.h" }, { "type": "file", "file": "usr/lib/pkgconfig/somelib.pc" } ]