diff --git a/data/test.schema.json b/data/test.schema.json index e87e7d03a9e5..1fe60a694c14 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 8f796ab65530..72ed7dbbd323 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 ab34c27f21d2..79d35c8fc4b0 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -158,6 +158,8 @@ def get_path(self, compiler: str, env: environment.Environment) -> T.Optional[Pa '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/test.json b/test cases/common/230 external project/test.json index 4df7d4ac57ff..ff8b55838647 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" } ]