forked from mesonbuild/meson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a json schema for the test.json used in tests
This does a couple of nice things, one is that editors like vscode can be configured to use this schema to provide auto completion and error highlighting if invalid values are added or required values are missing. It also allows us test that the format of the test matrix work in a unit test, which I've added. It does require that the python jsonschema package is installed.
- Loading branch information
Showing
4 changed files
with
143 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,5 @@ indent_size = 2 | |
[meson.build] | ||
indent_size = 2 | ||
|
||
[*.json] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"env": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"installed": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"file": { | ||
"type": "string" | ||
}, | ||
"type": { | ||
"type": "string", | ||
"enum": [ | ||
"file", | ||
"exe", | ||
"shared_lib", | ||
"pdb", | ||
"implib", | ||
"implibempty", | ||
"expr" | ||
] | ||
}, | ||
"platform": { | ||
"type": "string", | ||
"enum": [ | ||
"msvc", | ||
"gcc", | ||
"cygwin", | ||
"!cygwin" | ||
] | ||
}, | ||
"version": { | ||
"type": "string" | ||
}, | ||
"language": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"file", | ||
"type" | ||
] | ||
} | ||
}, | ||
"matrix": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"properties": { | ||
"options": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"val": { | ||
"type": "string" | ||
}, | ||
"compilers": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
}, | ||
"skip_on_env": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"required": [ | ||
"val" | ||
] | ||
} | ||
}, | ||
"exclude": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"do_not_set_opts": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"enum": [ | ||
"libdir", | ||
"prefix" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters