Buildtest Command Reference¶
buildtest is a HPC testing framework for building and running tests.
usage: buildtest [options] [COMMANDS]
Named Arguments¶
- -V, --version
show program’s version number and exit
- -c, --config
Specify Path to Configuration File
- -d, --debug
Print debug messages to screen
Default: False
COMMANDS¶
Possible choices: build, history, buildspec, config, report, inspect, schema, cdash, docs, schemadocs, help
Sub-commands:¶
build¶
Build and Run test
buildtest build [-h] [-b BUILDSPEC] [-x EXCLUDE] [-t TAGS] [-ft FILTER_TAGS]
[-e EXECUTOR] [-s {parse,build}] [--testdir TESTDIR]
[--rebuild REBUILD] [-r REPORT]
[--max-pend-time MAX_PEND_TIME]
[--poll-interval POLL_INTERVAL] [-k]
Named Arguments¶
- -b, --buildspec
Specify a buildspec (file or directory) to build. A buildspec must end in ‘.yml’ extension.
- -x, --exclude
Exclude one or more buildspecs (file or directory) from processing. A buildspec must end in ‘.yml’ extension.
- -t, --tags
Discover buildspecs by tags found in buildspec cache
- -ft, --filter-tags
Filter buildspecs by tags when building tests.
- -e, --executor
Discover buildspecs by executor name found in buildspec cache
- -s, --stage
Possible choices: parse, build
control behavior of buildtest build
- --testdir
Specify a custom test directory where to write tests. This overrides configuration file and default location.
- --rebuild
Rebuild test X number of times. Must be a positive number between [1-50]
- -r, --report
Specify a report file where tests will be written.
- --max-pend-time
Specify Maximum Pending Time (sec) for job before cancelling job. This only applies for batch job submission.
- --poll-interval
Specify Poll Interval (sec) for polling batch jobs
- -k, --keep-stage-dir
Keep stage directory after job completion.
Default: False
buildspec¶
Options for querying buildspec cache
buildtest buildspec [-h] ...
Sub-commands:¶
find¶
find all buildspecs
buildtest buildspec find [-h] [--root ROOT] [-r] [-t] [-b] [-e] [-p]
[--group-by-tags] [--group-by-executor] [-m] [-mb]
[--filter FILTER] [--format FORMAT] [--helpfilter]
[--helpformat] [--terse]
Named Arguments¶
- --root
Specify root buildspecs (directory) path to load buildspecs into buildspec cache.
- -r, --rebuild
Rebuild buildspec cache and find all buildspecs again
Default: False
- -t, --tags
List all available tags
Default: False
- -b, --buildspec
Get all buildspec files from cache
Default: False
- -e, --executors
get all unique executors from buildspecs
Default: False
- -p, --paths
print all root buildspec paths
Default: False
- --group-by-tags
Group tests by tag name
Default: False
- --group-by-executor
Group tests by executor name
Default: False
- -m, --maintainers
Get all maintainers for all buildspecs
Default: False
- -mb, --maintainers-by-buildspecs
Show maintainers breakdown by buildspecs
Default: False
- --filter
Filter buildspec cache with filter fields in format –filter key1=val1,key2=val2
- --format
Format buildspec cache with format fields in format –format field1,field2,…
- --helpfilter
Show Filter fields for –filter option for filtering buildspec cache output
Default: False
- --helpformat
Show Format fields for –format option for formatting buildspec cache output
Default: False
- --terse
Print output in machine readable format
Default: False
validate¶
Validate buildspecs
buildtest buildspec validate [-h] [-b BUILDSPEC] [-x EXCLUDE] [-t TAG]
[-e EXECUTOR]
Named Arguments¶
- -b, --buildspec
Specify path to buildspec (file, or directory) to validate
- -x, --exclude
Specify path to buildspec to exclude (file or directory) during validation
- -t, --tag
Specify buildspecs by tag name to validate
- -e, --executor
Specify buildspecs by executor name to validate
config¶
Query buildtest configuration
buildtest config [-h] ...
subcommands¶
Query information from buildtest configuration file
Possible choices: executors, view, validate, summary, systems, compilers
Sub-commands:¶
executors¶
Query executors from buildtest configuration
buildtest config executors [-h] [-j] [-y]
Named Arguments¶
- -j, --json
View executor in JSON format
Default: False
- -y, --yaml
View executors in YAML format
Default: False
report¶
Query test report
buildtest report [-h] [--helpformat] [--helpfilter] [--format FORMAT]
[--filter FILTER] [--latest] [--oldest] [-r REPORT]
...
Named Arguments¶
- --helpformat
List of available format fields
Default: False
- --helpfilter
List available filter fields to be used with –filter option
Default: False
- --format
format field for printing purposes. For more details see –helpformat for list of available fields. Fields must be separated by comma (usage: –format <field1>,<field2>,…)
- --filter
Filter report by filter fields. The filter fields must be a key=value pair and multiple fields can be comma separated in the following format: –filter key1=val1,key2=val2 . For list of filter fields run: –helpfilter.
- --latest
Retrieve latest record of particular test
Default: False
- --oldest
Retrieve oldest record of particular test
Default: False
- -r, --report
Specify a report file to read
Default: “/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.10.0/var/report.json”
subcommands¶
Fetch test results from report file and print them in table format
Possible choices: clear, list
inspect¶
Inspect a test based on NAME or ID
buildtest inspect [-h] [-r REPORT] ...
Named Arguments¶
- -r, --report
Specify a report file to load when inspecting test
schema¶
List schema contents and examples
buildtest schema [-h] [-n Schema Name] [-e] [-j]
Named Arguments¶
- -n, --name
Possible choices: global.schema.json, definitions.schema.json, settings.schema.json, compiler-v1.0.schema.json, spack-v1.0.schema.json, script-v1.0.schema.json
show schema by name (e.g., script)
- -e, --example
Show schema examples
Default: False
- -j, --json
Display json schema file
Default: False
GitHub: https://github.com/buildtesters/buildtest Documentation: https://buildtest.readthedocs.io/en/latest/index.html Schema Documentation: https://buildtesters.github.io/buildtest/ Slack: http://hpcbuildtest.slack.com/
Please report issues at https://github.com/buildtesters/buildtest/issues
Copyright (c) 2021, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy), Shahzeb Siddiqui, and Vanessa Sochat. All rights reserved.