Skip to content

Commit

Permalink
added windows and !windows as supported platform value in test co…
Browse files Browse the repository at this point in the history
…nfiguration
  • Loading branch information
na-trium-144 committed Nov 19, 2024
1 parent fa0ffbf commit bd1f2ea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion data/test.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
"msvc",
"gcc",
"cygwin",
"!cygwin"
"!cygwin",
"windows",
"!windows"
]
},
"version": {
Expand Down
2 changes: 2 additions & 0 deletions docs/markdown/Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions run_project_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test cases/common/230 external project/test.json
Original file line number Diff line number Diff line change
@@ -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" }
]
Expand Down

0 comments on commit bd1f2ea

Please sign in to comment.