All schema files use the file extension .schema.json to distinguish itself as a json schema definition from an ordinary json file. The schema files are located in buildtest/schemas directory.
The schema examples are great way to help write your buildspecs and help you understand the edge cases that can lead to an invalid buildspec. The schema examples are used in buildtest regression test for validating the schemas. We expose the examples through buildtest client so its accessible for everyone.
In order to view an example you can run:
buildtest schema -n <schema> --example
This schema is used for declaring definitions that need to be reused in multiple schemas. We use $ref
keyword to reference definitions from this file.
buildtest schema -n definitions.schema.json --json
This schema defines how buildtest configuration <configuring_buildtest>
file is validated.
buildtest schema -n settings.schema.json --json
buildtest schema -n settings.schema.json --example
This schema is used for validating buildspec file and validates outer level structure of test. This is referred as global_schema
buildtest schema -n global.schema.json --json
buildtest schema -n global.schema.json --example
This is the script schema used for writing scripts (bash, csh, sh, zsh, tcsh, python) and this is used for validating test instance when type: script
is specified. For more details on script schema see script_schema
.
buildtest schema -n script-v1.0.schema.json --json
buildtest schema -n script-v1.0.schema.json --example
This is the compiler schema used for validating buildspecs that define test using type: compiler
. This schema is used for compiling a single source code. For more details see compiler_schema
buildtest schema -n compiler-v1.0.schema.json --json
buildtest schema -n compiler-v1.0.schema.json --example
This schema is used for writing tests with spack package manager using type: spack
field. For more details see spack_schema
.
buildtest schema -n spack-v1.0.schema.json --json
buildtest schema -n spack-v1.0.schema.json --json