Skip to the content.

spack schema version Schema

spack.schema.json

The spack schema is referenced using type: spack which is used for generating tests using spack package manager

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

spack schema version Type

object (spack schema version)

spack schema version Properties

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

type

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

type

type Type

string

type Constraints

pattern: the string must match the following regular expression:

^spack$

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

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

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

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.

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

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)

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)

pre_cmds

Shell commands run before spack

pre_cmds

pre_cmds Type

string

post_cmds

Shell commands run after spack

post_cmds

post_cmds 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.

spack

Entry point to spack configuration

spack

spack Type

object (Details)

spack schema version Definitions

Definitions group env

Reference this group by using

{"$ref":"spack.schema.json#/definitions/env"}
Property Type Required Nullable Defined by
create object Optional cannot be null spack schema version
deactivate boolean Optional cannot be null spack schema version
activate object Optional cannot be null spack schema version
rm object Optional cannot be null spack schema version
mirror object Optional cannot be null spack schema version
specs array Optional cannot be null spack schema version
concretize boolean Optional cannot be null spack schema version

create

Create a spack environment via spack env create

create

create Type

object (Details)

deactivate

Deactivate a spack environment prior to activating it via spack env deactivate

deactivate

deactivate Type

boolean

activate

Activate a spack environment via spack env activate

activate

activate Type

object (Details)

rm

Remove an existing spack environment via spack env rm.

rm

rm Type

object (Details)

mirror

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

mirror

mirror Type

object (Details)

mirror Constraints

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

specs

Add specs to environment by running spack add <specs>. The specs is a list of string which expect the argument to be name of spack package.

specs

specs Type

string[]

specs 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.

concretize

If concretize: true is set, we will concretize spack environment by running spack concretize -f otherwise this line will be ignored.

concretize

concretize Type

boolean

Definitions group install

Reference this group by using

{"$ref":"spack.schema.json#/definitions/install"}
Property Type Required Nullable Defined by
options string Optional cannot be null spack schema version
specs array Optional cannot be null spack schema version

options

Pass options to spack install command

options

options Type

string

specs

List of specs to install using spack install command

specs

specs Type

string[]

specs 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.

Definitions group load

Reference this group by using

{"$ref":"spack.schema.json#/definitions/load"}
Property Type Required Nullable Defined by
options string Optional cannot be null spack schema version
specs array Optional cannot be null spack schema version

options

Pass options to spack load command

options

options Type

string

specs

List of specs to install using spack load command

specs

specs Type

string[]

specs 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.

Definitions group test

Reference this group by using

{"$ref":"spack.schema.json#/definitions/test"}
Property Type Required Nullable Defined by
remove_tests boolean Optional cannot be null spack schema version
run object Required cannot be null spack schema version
results object Required cannot be null spack schema version

remove_tests

Remove all test suites in spack before running test via spack test run. If set to True we will run spack test remove -y which will remove all test suites.

remove_tests

remove_tests Type

boolean

run

Run tests using spack via spack test run command. This command requires specs are installed in your spack instance prior to running tests.

run

run Type

object (Details)

results

View test results via spack test results after running tests via spack test run. Results can be viewed using suitename or installed specs or both.

results

results Type

object (Details)