Skip to the content.

script schema version Schema

script.schema.json

The script schema is of type: script in sub-schema which is used for running shell scripts

Abstract Extensible Status Identifiable Custom Properties Additional Properties Access Restrictions Defined In
Can be instantiated Yes Unknown status No Forbidden Forbidden none script.schema.json

script schema version Type

object (script schema version)

script schema version Properties

Property Type Required Nullable Defined by
type string Required cannot be null script schema version
description string Optional cannot be null script schema version
summary string Optional cannot be null script schema version
sbatch array Optional cannot be null script schema version
bsub array Optional cannot be null script schema version
cobalt array Optional cannot be null script schema version
pbs array Optional cannot be null script schema version
BB array Optional cannot be null script schema version
DW array Optional cannot be null script schema version
env object Optional cannot be null script schema version
vars object Optional cannot be null script schema version
executor string Required cannot be null script schema version
needs array Optional cannot be null script schema version
shell string Optional cannot be null script schema version
shebang string Optional cannot be null script schema version
run string Required cannot be null script schema version
status object Optional cannot be null script schema version
skip boolean Optional cannot be null script schema version
tags Merged Optional cannot be null script schema version
metrics object Optional cannot be null script schema version
executors object Optional cannot be null script schema version
compilers object Optional cannot be null script schema version

type

Select schema type to use when validating buildspec. This must be of set to ‘script’

type

type Type

string

type Constraints

pattern: the string must match the following regular expression:

^script$

try pattern

description

The description field is used to document what the test is doing

description

description Type

string

description Constraints

maximum length: the maximum number of characters for this string is: 80

summary

The summary field is used to document what the test is doing and can be a multi-line string

summary

summary Type

string

sbatch

This field is used for specifying #SBATCH options in test script.

sbatch

sbatch Type

string[]

sbatch Constraints

minimum number of items: the minimum number of items for this array is: 1

unique items: all items in this array must be unique. Duplicates are not allowed.

bsub

This field is used for specifying #BSUB options in test script.

bsub

bsub Type

string[]

bsub Constraints

minimum number of items: the minimum number of items for this array is: 1

unique items: all items in this array must be unique. Duplicates are not allowed.

cobalt

This field is used for specifying #COBALT options in test script.

cobalt

cobalt Type

string[]

cobalt Constraints

minimum number of items: the minimum number of items for this array is: 1

unique items: all items in this array must be unique. Duplicates are not allowed.

pbs

This field is used for specifying #PBS directives in test script.

pbs

pbs Type

string[]

pbs Constraints

minimum number of items: the minimum number of items for this array is: 1

unique items: all items in this array must be unique. Duplicates are not allowed.

BB

Create burst buffer space, this specifies #BB options in your test.

BB

BB Type

string[]

BB Constraints

minimum number of items: the minimum number of items for this array is: 1

unique items: all items in this array must be unique. Duplicates are not allowed.

DW

Specify Data Warp option (#DW) when using burst buffer.

DW

DW Type

string[]

DW Constraints

minimum number of items: the minimum number of items for this array is: 1

unique items: all items in this array must be unique. Duplicates are not allowed.

env

One or more key value pairs for an environment (key=value)

env

env Type

object (Details)

env Constraints

minimum number of items: the minimum number of items for this array is: 1

vars

One or more key value pairs for an environment (key=value)

vars

vars Type

object (Details)

vars Constraints

minimum number of items: the minimum number of items for this array is: 1

executor

Select one of the executor name defined in your configuration file (config.yml). Every buildspec must have an executor which is responsible for running job.

executor

executor Type

string

needs

A list of test names that are dependency before runnning job

needs

needs Type

an array where each item follows the corresponding schema in the following list:

  1. Untitled undefined type in JSON Schema Definitions File.

shell

Specify a shell launcher to use when running jobs. This sets the shebang line in your test script. The shell key can be used with run section to describe content of script and how its executed

shell

shell Type

string

shebang

Specify a custom shebang line. If not specified buildtest will automatically add it in the test script.

shebang

shebang Type

string

run

Specify a series of commands to run.

run

run Type

string

status

The status section describes how buildtest detects PASS/FAIL on test. By default returncode 0 is a PASS and anything else is a FAIL, however buildtest can support other types of PASS/FAIL conditions.

status

status Type

object (Details)

skip

The skip is a boolean field that can be used to skip tests during builds. By default buildtest will build and run all tests in your buildspec file, if skip: True is set it will skip the buildspec.

skip

skip Type

boolean

tags

Classify tests using a tag name, this can be used for categorizing test and building tests using --tags option

tags

tags Type

merged type (Details)

one (and only one) of

metrics

This field is used for defining one or more metrics that is recorded for each test. A metric must have a unique name which is recorded in the test metadata.

metrics

metrics Type

object (Details)

executors

Define executor specific configuration

executors

executors Type

object (Details)

compilers

compilers

compilers Type

object (Details)

script schema version Definitions

Definitions group compiler_declaration

Reference this group by using

{"$ref":"script.schema.json#/definitions/compiler_declaration"}
Property Type Required Nullable Defined by
cc string Optional cannot be null script schema version
fc string Optional cannot be null script schema version
cxx string Optional cannot be null script schema version
cflags string Optional cannot be null script schema version
fflags string Optional cannot be null script schema version
cxxflags string Optional cannot be null script schema version
ldflags string Optional cannot be null script schema version
cppflags string Optional cannot be null script schema version
env object Optional cannot be null script schema version
vars object Optional cannot be null script schema version
status object Optional cannot be null script schema version
run string Optional cannot be null script schema version
module object Optional cannot be null script schema version

cc

Set C compiler wrapper

cc

cc Type

string

fc

Set Fortran compiler wrapper

fc

fc Type

string

cxx

Set C++ compiler wrapper

cxx

cxx Type

string

cflags

Set C compiler flags.

cflags

cflags Type

string

fflags

Set Fortran compiler flags.

fflags

fflags Type

string

cxxflags

Set C++ compiler flags.

cxxflags

cxxflags Type

string

ldflags

Set linker flags

ldflags

ldflags Type

string

cppflags

Set C or C++ preprocessor flags

cppflags

cppflags Type

string

env

One or more key value pairs for an environment (key=value)

env

env Type

object (Details)

env Constraints

minimum number of items: the minimum number of items for this array is: 1

vars

One or more key value pairs for an environment (key=value)

vars

vars Type

object (Details)

vars Constraints

minimum number of items: the minimum number of items for this array is: 1

status

The status section describes how buildtest detects PASS/FAIL on test. By default returncode 0 is a PASS and anything else is a FAIL, however buildtest can support other types of PASS/FAIL conditions.

status

status Type

object (Details)

run

Specify a series of commands to run.

run

run Type

string

module

module

module Type

object (Details)

Definitions group default_compiler_config

Reference this group by using

{"$ref":"script.schema.json#/definitions/default_compiler_config"}
Property Type Required Nullable Defined by
cc string Optional cannot be null script schema version
fc string Optional cannot be null script schema version
cxx string Optional cannot be null script schema version
cflags string Optional cannot be null script schema version
fflags string Optional cannot be null script schema version
cxxflags string Optional cannot be null script schema version
ldflags string Optional cannot be null script schema version
cppflags string Optional cannot be null script schema version
env object Optional cannot be null script schema version
vars object Optional cannot be null script schema version
status object Optional cannot be null script schema version
run string Optional cannot be null script schema version

cc

Set C compiler wrapper

cc

cc Type

string

fc

Set Fortran compiler wrapper

fc

fc Type

string

cxx

Set C++ compiler wrapper

cxx

cxx Type

string

cflags

Set C compiler flags.

cflags

cflags Type

string

fflags

Set Fortran compiler flags.

fflags

fflags Type

string

cxxflags

Set C++ compiler flags.

cxxflags

cxxflags Type

string

ldflags

Set linker flags

ldflags

ldflags Type

string

cppflags

Set C or C++ preprocessor flags

cppflags

cppflags Type

string

env

One or more key value pairs for an environment (key=value)

env

env Type

object (Details)

env Constraints

minimum number of items: the minimum number of items for this array is: 1

vars

One or more key value pairs for an environment (key=value)

vars

vars Type

object (Details)

vars Constraints

minimum number of items: the minimum number of items for this array is: 1

status

The status section describes how buildtest detects PASS/FAIL on test. By default returncode 0 is a PASS and anything else is a FAIL, however buildtest can support other types of PASS/FAIL conditions.

status

status Type

object (Details)

run

Specify a series of commands to run.

run

run Type

string