Command Line Tutorial

For this session, we assume you have installed buildtest on your system. You can check if buildtest command is available by running:

$ buildtest --help

If you receive an error please go back and re-install buildtest.

If you are new to buildtest you can review the quick start guide to learn the basics of buildtest.

Building Test

The buildtest build command is used for running a test on your system given a buildspec file (YAML). The most common way to build a test is specifying a file path via buildtest build -b <path>. To get started, let’s build our first test by running the following.

buildtest build -b $BUILDTEST_ROOT/tutorials/hello_world.yml
$ buildtest build -b $BUILDTEST_ROOT/tutorials/hello_world.yml
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-24085352-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2024/04/16 16:47:10                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ buildtest version:  2.0                                                      │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ python version:     3.8.18                                                   │
│ Configuration File: /tmp/tmpdzcbbdmp/config.yml                              │
│ Test Directory:     /tmp/tmpdzcbbdmp/var/tests                               │
│ Report File:        /tmp/tmpdzcbbdmp/var/report.json                         │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ buildspec                                                                    ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/ ║
║ tutorials/hello_world.yml                                                    ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ Total: 1                                                                     ║
╚══════════════════════════════════════════════════════════════════════════════╝


Total Discovered Buildspecs:  1
Total Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 1
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/tutorials/hello_world.yml: VALID
Total builder objects created: 1
                            Builders by type=script                             
┏━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┓
┃          ┃        ┃          ┃          ┃       ┃       ┃ descript ┃ buildsp ┃
┃ builder  ┃ type   ┃ executor ┃ compiler ┃ nodes ┃ procs ┃ ion      ┃ ecs     ┃
┡━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━┩
│ hello_wo │ script │ generic. │ None     │ None  │ None  │ hello    │ /home/d │
│ rld/cb09 │        │ local.ba │          │       │       │ world    │ ocs/che │
│ da50     │        │ sh       │          │       │       │ example  │ ckouts/ │
│          │        │          │          │       │       │          │ readthe │
│          │        │          │          │       │       │          │ docs.or │
│          │        │          │          │       │       │          │ g/user_ │
│          │        │          │          │       │       │          │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/t │
│          │        │          │          │       │       │          │ utorial │
│          │        │          │          │       │       │          │ s/hello │
│          │        │          │          │       │       │          │ _world. │
│          │        │          │          │       │       │          │ yml     │
└──────────┴────────┴──────────┴──────────┴───────┴───────┴──────────┴─────────┘
──────────────────────────────── Building Test ─────────────────────────────────
hello_world/cb09da50: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/cb09da50
──────────────────────────────── Running Tests ─────────────────────────────────
Spawning 1 processes for processing builders
───────────────────────────────── Iteration 1 ──────────────────────────────────
hello_world/cb09da50 does not have any dependencies adding test to queue
Builders Eligible to Run
┏━━━━━━━━━━━━━━━━━━━━━━┓
┃ Builder              ┃
┡━━━━━━━━━━━━━━━━━━━━━━┩
│ hello_world/cb09da50 │
└──────────────────────┘
hello_world/cb09da50: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/cb09da50/stage
hello_world/cb09da50: Running Test via command: bash hello_world_build.sh
hello_world/cb09da50: Test completed in 0.006067 seconds with returncode: 0
hello_world/cb09da50: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/cb09da50/hello_world.out
hello_world/cb09da50: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/cb09da50/hello_world.err
                                Test Summary                                 
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┓
┃ builder              ┃ executor           ┃ status ┃ returncode ┃ runtime ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━┩
│ hello_world/cb09da50 │ generic.local.bash │ PASS   │ 0          │ 0.006   │
└──────────────────────┴────────────────────┴────────┴────────────┴─────────┘



Passed Tests: 1/1 Percentage: 100.000%
Failed Tests: 0/1 Percentage: 0.000%


Adding 1 test results to report file: /tmp/tmpdzcbbdmp/var/report.json
Writing Logfile to /tmp/tmpdzcbbdmp/var/logs/buildtest_hn9ru9jg.log

The -b option can be specified multiple times and it can be used with directory path. buildtest will recursively search for all .yml extensions and attempt to build all tests.

Let’s try running the following command, where we will build by file and directory.

buildtest build -b $BUILDTEST_ROOT/tutorials/hello_world.yml -b $BUILDTEST_ROOT/general_tests/configuration
$ buildtest build -b $BUILDTEST_ROOT/tutorials/hello_world.yml -b $BUILDTEST_ROOT/general_tests/configuration
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-24085352-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2024/04/16 16:47:11                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ buildtest version:  2.0                                                      │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ python version:     3.8.18                                                   │
│ Configuration File: /tmp/tmpdzcbbdmp/config.yml                              │
│ Test Directory:     /tmp/tmpdzcbbdmp/var/tests                               │
│ Report File:        /tmp/tmpdzcbbdmp/var/report.json                         │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ buildspec                                                                    ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/ ║
║ general_tests/configuration/kernel_state.yml                                 ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/ ║
║ general_tests/configuration/ulimits.yml                                      ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/ ║
║ general_tests/configuration/disk_usage.yml                                   ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/ ║
║ general_tests/configuration/systemd-default-target.yml                       ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/ ║
║ tutorials/hello_world.yml                                                    ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ Total: 5                                                                     ║
╚══════════════════════════════════════════════════════════════════════════════╝


Total Discovered Buildspecs:  5
Total Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  5
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 5
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/general_tests/configuration/kernel_state.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/general_tests/configuration/ulimits.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/general_tests/configuration/disk_usage.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/general_tests/configuration/systemd-default-target.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/tutorials/hello_world.yml: VALID
Total builder objects created: 10
                            Builders by type=script                             
┏━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┓
┃          ┃        ┃          ┃          ┃       ┃       ┃ descript ┃ buildsp ┃
┃ builder  ┃ type   ┃ executor ┃ compiler ┃ nodes ┃ procs ┃ ion      ┃ ecs     ┃
┡━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━┩
│ kernel_s │ script │ generic. │ None     │ None  │ None  │ Retrieve │ /home/d │
│ wapusage │        │ local.ba │          │       │       │ Kernel   │ ocs/che │
│ /94b7ff2 │        │ sh       │          │       │       │ Swap     │ ckouts/ │
│ 0        │        │          │          │       │       │ Usage    │ readthe │
│          │        │          │          │       │       │          │ docs.or │
│          │        │          │          │       │       │          │ g/user_ │
│          │        │          │          │       │       │          │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/g │
│          │        │          │          │       │       │          │ eneral_ │
│          │        │          │          │       │       │          │ tests/c │
│          │        │          │          │       │       │          │ onfigur │
│          │        │          │          │       │       │          │ ation/k │
│          │        │          │          │       │       │          │ ernel_s │
│          │        │          │          │       │       │          │ tate.ym │
│          │        │          │          │       │       │          │ l       │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_f │ script │ generic. │ None     │ None  │ None  │ Check if │ /home/d │
│ ilelock_ │        │ local.ba │          │       │       │ file     │ ocs/che │
│ unlimite │        │ sh       │          │       │       │ lock is  │ ckouts/ │
│ d/559523 │        │          │          │       │       │ set to   │ readthe │
│ fb       │        │          │          │       │       │ unlimite │ docs.or │
│          │        │          │          │       │       │ d in     │ g/user_ │
│          │        │          │          │       │       │ ulimits  │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/g │
│          │        │          │          │       │       │          │ eneral_ │
│          │        │          │          │       │       │          │ tests/c │
│          │        │          │          │       │       │          │ onfigur │
│          │        │          │          │       │       │          │ ation/u │
│          │        │          │          │       │       │          │ limits. │
│          │        │          │          │       │       │          │ yml     │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_c │ script │ generic. │ None     │ None  │ None  │ Check if │ /home/d │
│ putime_u │        │ local.ba │          │       │       │ cputime  │ ocs/che │
│ nlimited │        │ sh       │          │       │       │ is set   │ ckouts/ │
│ /356fcb6 │        │          │          │       │       │ to       │ readthe │
│ 7        │        │          │          │       │       │ unlimite │ docs.or │
│          │        │          │          │       │       │ d in     │ g/user_ │
│          │        │          │          │       │       │ ulimits  │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/g │
│          │        │          │          │       │       │          │ eneral_ │
│          │        │          │          │       │       │          │ tests/c │
│          │        │          │          │       │       │          │ onfigur │
│          │        │          │          │       │       │          │ ation/u │
│          │        │          │          │       │       │          │ limits. │
│          │        │          │          │       │       │          │ yml     │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_s │ script │ generic. │ None     │ None  │ None  │ Check if │ /home/d │
│ tacksize │        │ local.ba │          │       │       │ stack    │ ocs/che │
│ _unlimit │        │ sh       │          │       │       │ size is  │ ckouts/ │
│ ed/a167e │        │          │          │       │       │ set to   │ readthe │
│ 35b      │        │          │          │       │       │ unlimite │ docs.or │
│          │        │          │          │       │       │ d in     │ g/user_ │
│          │        │          │          │       │       │ ulimits  │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/g │
│          │        │          │          │       │       │          │ eneral_ │
│          │        │          │          │       │       │          │ tests/c │
│          │        │          │          │       │       │          │ onfigur │
│          │        │          │          │       │       │          │ ation/u │
│          │        │          │          │       │       │          │ limits. │
│          │        │          │          │       │       │          │ yml     │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_v │ script │ generic. │ None     │ None  │ None  │ Check    │ /home/d │
│ msize_un │        │ local.ba │          │       │       │ virtual  │ ocs/che │
│ limited/ │        │ sh       │          │       │       │ memory   │ ckouts/ │
│ 512934d6 │        │          │          │       │       │ size and │ readthe │
│          │        │          │          │       │       │ check if │ docs.or │
│          │        │          │          │       │       │ its set  │ g/user_ │
│          │        │          │          │       │       │ to       │ builds/ │
│          │        │          │          │       │       │ unlimite │ buildte │
│          │        │          │          │       │       │ d        │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/g │
│          │        │          │          │       │       │          │ eneral_ │
│          │        │          │          │       │       │          │ tests/c │
│          │        │          │          │       │       │          │ onfigur │
│          │        │          │          │       │       │          │ ation/u │
│          │        │          │          │       │       │          │ limits. │
│          │        │          │          │       │       │          │ yml     │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_f │ script │ generic. │ None     │ None  │ None  │ Check if │ /home/d │
│ iledescr │        │ local.ba │          │       │       │ open     │ ocs/che │
│ iptor_40 │        │ sh       │          │       │       │ file     │ ckouts/ │
│ 96/8ae0e │        │          │          │       │       │ descript │ readthe │
│ c3f      │        │          │          │       │       │ ors      │ docs.or │
│          │        │          │          │       │       │ limit is │ g/user_ │
│          │        │          │          │       │       │ set to   │ builds/ │
│          │        │          │          │       │       │ 4096     │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/g │
│          │        │          │          │       │       │          │ eneral_ │
│          │        │          │          │       │       │          │ tests/c │
│          │        │          │          │       │       │          │ onfigur │
│          │        │          │          │       │       │          │ ation/u │
│          │        │          │          │       │       │          │ limits. │
│          │        │          │          │       │       │          │ yml     │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_m │ script │ generic. │ None     │ None  │ None  │ Check    │ /home/d │
│ ax_user_ │        │ local.ba │          │       │       │ max      │ ocs/che │
│ process_ │        │ sh       │          │       │       │ number   │ ckouts/ │
│ 2048/cc3 │        │          │          │       │       │ of user  │ readthe │
│ d3e50    │        │          │          │       │       │ process  │ docs.or │
│          │        │          │          │       │       │ limit is │ g/user_ │
│          │        │          │          │       │       │ set to   │ builds/ │
│          │        │          │          │       │       │ 2048     │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/g │
│          │        │          │          │       │       │          │ eneral_ │
│          │        │          │          │       │       │          │ tests/c │
│          │        │          │          │       │       │          │ onfigur │
│          │        │          │          │       │       │          │ ation/u │
│          │        │          │          │       │       │          │ limits. │
│          │        │          │          │       │       │          │ yml     │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ root_dis │ script │ generic. │ None     │ None  │ None  │ Check    │ /home/d │
│ k_usage/ │        │ local.ba │          │       │       │ root     │ ocs/che │
│ b784ff0f │        │ sh       │          │       │       │ disk     │ ckouts/ │
│          │        │          │          │       │       │ usage    │ readthe │
│          │        │          │          │       │       │ and      │ docs.or │
│          │        │          │          │       │       │ report   │ g/user_ │
│          │        │          │          │       │       │ if it    │ builds/ │
│          │        │          │          │       │       │ exceeds  │ buildte │
│          │        │          │          │       │       │ threshol │ st/chec │
│          │        │          │          │       │       │ d        │ kouts/s │
│          │        │          │          │       │       │          │ table/g │
│          │        │          │          │       │       │          │ eneral_ │
│          │        │          │          │       │       │          │ tests/c │
│          │        │          │          │       │       │          │ onfigur │
│          │        │          │          │       │       │          │ ation/d │
│          │        │          │          │       │       │          │ isk_usa │
│          │        │          │          │       │       │          │ ge.yml  │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ systemd_ │ script │ generic. │ None     │ None  │ None  │ check if │ /home/d │
│ default_ │        │ local.ba │          │       │       │ default  │ ocs/che │
│ target/8 │        │ sh       │          │       │       │ target   │ ckouts/ │
│ e8bde7b  │        │          │          │       │       │ is       │ readthe │
│          │        │          │          │       │       │ multi-us │ docs.or │
│          │        │          │          │       │       │ er.targe │ g/user_ │
│          │        │          │          │       │       │ t        │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/g │
│          │        │          │          │       │       │          │ eneral_ │
│          │        │          │          │       │       │          │ tests/c │
│          │        │          │          │       │       │          │ onfigur │
│          │        │          │          │       │       │          │ ation/s │
│          │        │          │          │       │       │          │ ystemd- │
│          │        │          │          │       │       │          │ default │
│          │        │          │          │       │       │          │ -target │
│          │        │          │          │       │       │          │ .yml    │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ hello_wo │ script │ generic. │ None     │ None  │ None  │ hello    │ /home/d │
│ rld/d3c1 │        │ local.ba │          │       │       │ world    │ ocs/che │
│ b507     │        │ sh       │          │       │       │ example  │ ckouts/ │
│          │        │          │          │       │       │          │ readthe │
│          │        │          │          │       │       │          │ docs.or │
│          │        │          │          │       │       │          │ g/user_ │
│          │        │          │          │       │       │          │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/t │
│          │        │          │          │       │       │          │ utorial │
│          │        │          │          │       │       │          │ s/hello │
│          │        │          │          │       │       │          │ _world. │
│          │        │          │          │       │       │          │ yml     │
└──────────┴────────┴──────────┴──────────┴───────┴───────┴──────────┴─────────┘
──────────────────────────────── Building Test ─────────────────────────────────
kernel_swapusage/94b7ff20: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/kernel_state/kernel_swapusage/94b7ff20
ulimit_filelock_unlimited/559523fb: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimited/559523fb
ulimit_cputime_unlimited/356fcb67: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/356fcb67
ulimit_stacksize_unlimited/a167e35b: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimited/a167e35b
ulimit_vmsize_unlimited/512934d6: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/512934d6
ulimit_filedescriptor_4096/8ae0ec3f: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/8ae0ec3f
ulimit_max_user_process_2048/cc3d3e50: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/cc3d3e50
root_disk_usage/b784ff0f: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/disk_usage/root_disk_usage/b784ff0f
systemd_default_target/8e8bde7b: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/systemd-default-target/systemd_default_target/8e8bde7b
hello_world/d3c1b507: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/d3c1b507
──────────────────────────────── Running Tests ─────────────────────────────────
Spawning 1 processes for processing builders
───────────────────────────────── Iteration 1 ──────────────────────────────────
ulimit_vmsize_unlimited/512934d6 does not have any dependencies adding test to queue
ulimit_max_user_process_2048/cc3d3e50 does not have any dependencies adding test to queue
ulimit_stacksize_unlimited/a167e35b does not have any dependencies adding test to queue
systemd_default_target/8e8bde7b does not have any dependencies adding test to queue
ulimit_cputime_unlimited/356fcb67 does not have any dependencies adding test to queue
ulimit_filedescriptor_4096/8ae0ec3f does not have any dependencies adding test to queue
ulimit_filelock_unlimited/559523fb does not have any dependencies adding test to queue
kernel_swapusage/94b7ff20 does not have any dependencies adding test to queue
root_disk_usage/b784ff0f does not have any dependencies adding test to queue
hello_world/d3c1b507 does not have any dependencies adding test to queue
        Builders Eligible to Run         
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Builder                               ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ ulimit_vmsize_unlimited/512934d6      │
│ ulimit_max_user_process_2048/cc3d3e50 │
│ ulimit_stacksize_unlimited/a167e35b   │
│ systemd_default_target/8e8bde7b       │
│ ulimit_cputime_unlimited/356fcb67     │
│ ulimit_filedescriptor_4096/8ae0ec3f   │
│ ulimit_filelock_unlimited/559523fb    │
│ kernel_swapusage/94b7ff20             │
│ root_disk_usage/b784ff0f              │
│ hello_world/d3c1b507                  │
└───────────────────────────────────────┘
ulimit_vmsize_unlimited/512934d6: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/512934d6/stage
ulimit_vmsize_unlimited/512934d6: Running Test via command: bash ulimit_vmsize_unlimited_build.sh
ulimit_vmsize_unlimited/512934d6: Test completed in 0.006054 seconds with returncode: 0
ulimit_vmsize_unlimited/512934d6: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/512934d6/ulimit_vmsize_unlimited.out
ulimit_vmsize_unlimited/512934d6: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/512934d6/ulimit_vmsize_unlimited.err
ulimit_vmsize_unlimited/512934d6: performing regular expression - '^unlimited$' on file: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/512934d6/ulimit_vmsize_unlimited.out
ulimit_vmsize_unlimited/512934d6: Regular Expression Match - Success!
ulimit_max_user_process_2048/cc3d3e50: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/cc3d3e50/stage
ulimit_max_user_process_2048/cc3d3e50: Running Test via command: bash ulimit_max_user_process_2048_build.sh
ulimit_max_user_process_2048/cc3d3e50: Test completed in 0.005603 seconds with returncode: 0
ulimit_max_user_process_2048/cc3d3e50: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/cc3d3e50/ulimit_max_user_process_2048.out
ulimit_max_user_process_2048/cc3d3e50: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/cc3d3e50/ulimit_max_user_process_2048.err
ulimit_max_user_process_2048/cc3d3e50: performing regular expression - '^2048$' on file: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/cc3d3e50/ulimit_max_user_process_2048.out
ulimit_max_user_process_2048/cc3d3e50: Regular Expression Match - Failed!
ulimit_stacksize_unlimited/a167e35b: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimited/a167e35b/stage
ulimit_stacksize_unlimited/a167e35b: Running Test via command: bash ulimit_stacksize_unlimited_build.sh
ulimit_stacksize_unlimited/a167e35b: Test completed in 0.005521 seconds with returncode: 0
ulimit_stacksize_unlimited/a167e35b: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimited/a167e35b/ulimit_stacksize_unlimited.out
ulimit_stacksize_unlimited/a167e35b: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimited/a167e35b/ulimit_stacksize_unlimited.err
ulimit_stacksize_unlimited/a167e35b: performing regular expression - '^unlimited$' on file: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimited/a167e35b/ulimit_stacksize_unlimited.out
ulimit_stacksize_unlimited/a167e35b: Regular Expression Match - Failed!
systemd_default_target/8e8bde7b: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/systemd-default-target/systemd_default_target/8e8bde7b/stage
systemd_default_target/8e8bde7b: Running Test via command: bash systemd_default_target_build.sh
systemd_default_target/8e8bde7b: failed to submit job with returncode: 1
────────────── Error Message for systemd_default_target/8e8bde7b ───────────────

systemd_default_target/8e8bde7b: Detected failure in running test, will attempt to retry test: 1 times
systemd_default_target/8e8bde7b: Run - 1/1
systemd_default_target/8e8bde7b: Running Test via command: bash systemd_default_target_build.sh
systemd_default_target/8e8bde7b: failed to submit job with returncode: 1
systemd_default_target/8e8bde7b: Test completed in 0.172032 seconds with returncode: 1
systemd_default_target/8e8bde7b: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/systemd-default-target/systemd_default_target/8e8bde7b/systemd_default_target.out
systemd_default_target/8e8bde7b: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/systemd-default-target/systemd_default_target/8e8bde7b/systemd_default_target.err
ulimit_cputime_unlimited/356fcb67: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/356fcb67/stage
ulimit_cputime_unlimited/356fcb67: Running Test via command: bash ulimit_cputime_unlimited_build.sh
ulimit_cputime_unlimited/356fcb67: Test completed in 0.005616 seconds with returncode: 0
ulimit_cputime_unlimited/356fcb67: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/356fcb67/ulimit_cputime_unlimited.out
ulimit_cputime_unlimited/356fcb67: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/356fcb67/ulimit_cputime_unlimited.err
ulimit_cputime_unlimited/356fcb67: performing regular expression - '^unlimited$' on file: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/356fcb67/ulimit_cputime_unlimited.out
ulimit_cputime_unlimited/356fcb67: Regular Expression Match - Success!
ulimit_filedescriptor_4096/8ae0ec3f: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/8ae0ec3f/stage
ulimit_filedescriptor_4096/8ae0ec3f: Running Test via command: bash ulimit_filedescriptor_4096_build.sh
ulimit_filedescriptor_4096/8ae0ec3f: Test completed in 0.005649 seconds with returncode: 0
ulimit_filedescriptor_4096/8ae0ec3f: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/8ae0ec3f/ulimit_filedescriptor_4096.out
ulimit_filedescriptor_4096/8ae0ec3f: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/8ae0ec3f/ulimit_filedescriptor_4096.err
ulimit_filedescriptor_4096/8ae0ec3f: performing regular expression - '^4096$' on file: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/8ae0ec3f/ulimit_filedescriptor_4096.out
ulimit_filedescriptor_4096/8ae0ec3f: Regular Expression Match - Failed!
ulimit_filelock_unlimited/559523fb: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimited/559523fb/stage
ulimit_filelock_unlimited/559523fb: Running Test via command: bash ulimit_filelock_unlimited_build.sh
ulimit_filelock_unlimited/559523fb: Test completed in 0.005742 seconds with returncode: 0
ulimit_filelock_unlimited/559523fb: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimited/559523fb/ulimit_filelock_unlimited.out
ulimit_filelock_unlimited/559523fb: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimited/559523fb/ulimit_filelock_unlimited.err
ulimit_filelock_unlimited/559523fb: performing regular expression - '^unlimited$' on file: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimited/559523fb/ulimit_filelock_unlimited.out
ulimit_filelock_unlimited/559523fb: Regular Expression Match - Success!
kernel_swapusage/94b7ff20: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/kernel_state/kernel_swapusage/94b7ff20/stage
kernel_swapusage/94b7ff20: Running Test via command: bash kernel_swapusage_build.sh
kernel_swapusage/94b7ff20: failed to submit job with returncode: 255
───────────────── Error Message for kernel_swapusage/94b7ff20 ──────────────────
sysctl: cannot stat /proc/sys/kernel/swapusage: No such file or directory

kernel_swapusage/94b7ff20: Detected failure in running test, will attempt to retry test: 1 times
kernel_swapusage/94b7ff20: Run - 1/1
kernel_swapusage/94b7ff20: Running Test via command: bash kernel_swapusage_build.sh
kernel_swapusage/94b7ff20: failed to submit job with returncode: 255
kernel_swapusage/94b7ff20: Test completed in 0.062716 seconds with returncode: 255
kernel_swapusage/94b7ff20: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/kernel_state/kernel_swapusage/94b7ff20/kernel_swapusage.out
kernel_swapusage/94b7ff20: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/kernel_state/kernel_swapusage/94b7ff20/kernel_swapusage.err
root_disk_usage/b784ff0f: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/disk_usage/root_disk_usage/b784ff0f/stage
root_disk_usage/b784ff0f: Running Test via command: bash root_disk_usage_build.sh
root_disk_usage/b784ff0f: Test completed in 0.012421 seconds with returncode: 0
root_disk_usage/b784ff0f: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/disk_usage/root_disk_usage/b784ff0f/root_disk_usage.out
root_disk_usage/b784ff0f: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/disk_usage/root_disk_usage/b784ff0f/root_disk_usage.err
hello_world/d3c1b507: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/d3c1b507/stage
hello_world/d3c1b507: Running Test via command: bash hello_world_build.sh
hello_world/d3c1b507: Test completed in 0.006705 seconds with returncode: 0
hello_world/d3c1b507: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/d3c1b507/hello_world.out
hello_world/d3c1b507: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/d3c1b507/hello_world.err
                                  Test Summary                                  
┏━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┓
┃ builder                 ┃ executor           ┃ status ┃ returncode ┃ runtime ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━┩
│ root_disk_usage/b784ff0 │ generic.local.bash │ PASS   │ 0          │ 0.012   │
│ f                       │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_vmsize_unlimited │ generic.local.bash │ PASS   │ 0          │ 0.006   │
│ /512934d6               │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_cputime_unlimite │ generic.local.bash │ PASS   │ 0          │ 0.006   │
│ d/356fcb67              │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ systemd_default_target/ │ generic.local.bash │ FAIL   │ 1          │ 0.172   │
│ 8e8bde7b                │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ hello_world/d3c1b507    │ generic.local.bash │ PASS   │ 0          │ 0.007   │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_stacksize_unlimi │ generic.local.bash │ FAIL   │ 0          │ 0.006   │
│ ted/a167e35b            │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ kernel_swapusage/94b7ff │ generic.local.bash │ FAIL   │ 255        │ 0.063   │
│ 20                      │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_max_user_process │ generic.local.bash │ FAIL   │ 0          │ 0.006   │
│ _2048/cc3d3e50          │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_filedescriptor_4 │ generic.local.bash │ FAIL   │ 0          │ 0.006   │
│ 096/8ae0ec3f            │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_filelock_unlimit │ generic.local.bash │ PASS   │ 0          │ 0.006   │
│ ed/559523fb             │                    │        │            │         │
└─────────────────────────┴────────────────────┴────────┴────────────┴─────────┘



Passed Tests: 5/10 Percentage: 50.000%
Failed Tests: 5/10 Percentage: 50.000%


Adding 10 test results to report file: /tmp/tmpdzcbbdmp/var/report.json
Writing Logfile to /tmp/tmpdzcbbdmp/var/logs/buildtest_00wolj0y.log

The -x option can be used to exclude buildspecs which works similar to -b where it can be a file or directory path. In the next example try running the following commands:

buildtest build -b general_tests/configuration -x general_tests/configuration/ulimits.yml
buildtest build -b general_tests/configuration -x general_tests/configuration

You will notice in the second command when buildtest has no buildspecs to build it will terminate immediately.

Buildtest supports test timeout which can be used if you don’t want to wait indefinitely for test to complete. You can use --timeout option which will terminate test if it exceeds the timelimit. The timeout is in number of seconds. Let’s try running the following example and take note of how timeout affects the test status:

buildtest build -b tutorials/sleep.yml
buildtest build -b tutorials/sleep.yml --timeout=1
buildtest build -b tutorials/sleep.yml --timeout=5

Buildtest supports test discovery based on tags via buildtest build --tags or short option -t. Let’s try running the following test, take note of the output as buildtest will show discovered buildspecs based on tag names

buildtest build -t network
$ buildtest build -t network
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-24085352-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2024/04/16 16:47:13                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ buildtest version:  2.0                                                      │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ python version:     3.8.18                                                   │
│ Configuration File: /tmp/tmpdzcbbdmp/config.yml                              │
│ Test Directory:     /tmp/tmpdzcbbdmp/var/tests                               │
│ Report File:        /tmp/tmpdzcbbdmp/var/report.json                         │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ buildspec                                                                    ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/ ║
║ tutorials/tags_example.yml                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ Total: 1                                                                     ║
╚══════════════════════════════════════════════════════════════════════════════╝
                           Buildspecs By Tag=network                            
╔══════════════════════════════════════════════════════════════════════════════╗
║ buildspec                                                                    ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/ ║
║ tutorials/tags_example.yml                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ Total: 1                                                                     ║
╚══════════════════════════════════════════════════════════════════════════════╝


Total Discovered Buildspecs:  1
Total Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 1
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/tutorials/tags_example.yml: VALID
Total builder objects created: 2
                            Builders by type=script                             
┏━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┓
┃          ┃        ┃          ┃          ┃       ┃       ┃ descript ┃ buildsp ┃
┃ builder  ┃ type   ┃ executor ┃ compiler ┃ nodes ┃ procs ┃ ion      ┃ ecs     ┃
┡━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━┩
│ string_t │ script │ generic. │ None     │ None  │ None  │ tags can │ /home/d │
│ ag/b4d37 │        │ local.ba │          │       │       │ be a     │ ocs/che │
│ e54      │        │ sh       │          │       │       │ string   │ ckouts/ │
│          │        │          │          │       │       │          │ readthe │
│          │        │          │          │       │       │          │ docs.or │
│          │        │          │          │       │       │          │ g/user_ │
│          │        │          │          │       │       │          │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/t │
│          │        │          │          │       │       │          │ utorial │
│          │        │          │          │       │       │          │ s/tags_ │
│          │        │          │          │       │       │          │ example │
│          │        │          │          │       │       │          │ .yml    │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ list_of_ │ script │ generic. │ None     │ None  │ None  │ tags can │ /home/d │
│ strings_ │        │ local.ba │          │       │       │ be a     │ ocs/che │
│ tags/152 │        │ sh       │          │       │       │ list of  │ ckouts/ │
│ 72483    │        │          │          │       │       │ strings  │ readthe │
│          │        │          │          │       │       │          │ docs.or │
│          │        │          │          │       │       │          │ g/user_ │
│          │        │          │          │       │       │          │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/s │
│          │        │          │          │       │       │          │ table/t │
│          │        │          │          │       │       │          │ utorial │
│          │        │          │          │       │       │          │ s/tags_ │
│          │        │          │          │       │       │          │ example │
│          │        │          │          │       │       │          │ .yml    │
└──────────┴────────┴──────────┴──────────┴───────┴───────┴──────────┴─────────┘
──────────────────────────────── Building Test ─────────────────────────────────
string_tag/b4d37e54: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/tags_example/string_tag/b4d37e54
list_of_strings_tags/15272483: Creating Test Directory: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/tags_example/list_of_strings_tags/15272483
──────────────────────────────── Running Tests ─────────────────────────────────
Spawning 1 processes for processing builders
───────────────────────────────── Iteration 1 ──────────────────────────────────
list_of_strings_tags/15272483 does not have any dependencies adding test to queue
string_tag/b4d37e54 does not have any dependencies adding test to queue
    Builders Eligible to Run     
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Builder                       ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string_tag/b4d37e54           │
│ list_of_strings_tags/15272483 │
└───────────────────────────────┘
string_tag/b4d37e54: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/tags_example/string_tag/b4d37e54/stage
string_tag/b4d37e54: Running Test via command: bash string_tag_build.sh
string_tag/b4d37e54: Test completed in 0.006841 seconds with returncode: 0
string_tag/b4d37e54: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/tags_example/string_tag/b4d37e54/string_tag.out
string_tag/b4d37e54: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/tags_example/string_tag/b4d37e54/string_tag.err
list_of_strings_tags/15272483: Current Working Directory : /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/tags_example/list_of_strings_tags/15272483/stage
list_of_strings_tags/15272483: Running Test via command: bash list_of_strings_tags_build.sh
list_of_strings_tags/15272483: Test completed in 3.030051 seconds with returncode: 0
list_of_strings_tags/15272483: Writing output file -  /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/tags_example/list_of_strings_tags/15272483/list_of_strings_tags.out
list_of_strings_tags/15272483: Writing error file - /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/tags_example/list_of_strings_tags/15272483/list_of_strings_tags.err
                                  Test Summary                                  
┏━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┓
┃ builder                 ┃ executor           ┃ status ┃ returncode ┃ runtime ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━┩
│ list_of_strings_tags/15 │ generic.local.bash │ PASS   │ 0          │ 3.030   │
│ 272483                  │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ string_tag/b4d37e54     │ generic.local.bash │ PASS   │ 0          │ 0.007   │
└─────────────────────────┴────────────────────┴────────┴────────────┴─────────┘



Passed Tests: 2/2 Percentage: 100.000%
Failed Tests: 0/2 Percentage: 0.000%


Adding 2 test results to report file: /tmp/tmpdzcbbdmp/var/report.json
Writing Logfile to /tmp/tmpdzcbbdmp/var/logs/buildtest_5t6n3yel.log

To learn more about how to run tests, please refer to Building Test (buildtest build) guide.

Querying Test Report

Buildtest will keep track of all tests in a report file (JSON) that can be used to display content of all test runs and query metadata specific to test. To fetch all test runs you can use buildtest report command which will displays output in a table format.

You can fetch the path to report file by running:

buildtest report path

Buildtest can write test results to alternate report file if buildtest --report is used, you can list all report files by running:

buildtest report list

buildtest rt is an alias for buildtest report command for those that hate typing :-)

We can fetch all pass and failed tests via --fail and --pass. Let’s try running the following:

buildtest rt --fail
buildtest rt --pass

Now let’s assume you want to know total failed tests in report file, you can use --row-count option which displays total row count. Let’s run the following and see total fail count:

buildtest rt --fail --row-count

The buildtest rt summary can be useful if you want to summary of report file.

Buildtest supports paging support with buildtest rt which can be useful when you have lots of tests. To enable pagination you can run:

buildtest rt --pager

Finally we can filter test records and format table columns via --filter and --format option. Let’s try running the following command

buildtest rt --filter tags=network --format name,id,tags
$ buildtest rt --filter tags=network --format name,id,tags
                 Report File: /tmp/tmpdzcbbdmp/var/report.json                  
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ name                                ┃ id              ┃ tags                 ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ list_of_strings_tags                │ 15272483        │ network ping         │
├─────────────────────────────────────┼─────────────────┼──────────────────────┤
│ string_tag                          │ b4d37e54        │ network              │
└─────────────────────────────────────┴─────────────────┴──────────────────────┘

The --format option are comma separated list of format fields while --filter option are key=value pair. To see list of available format and filter fields you can run:

buildtest rt --helpfilter
buildtest rt --helpformat

Inspecting Test

The buildtest inspect command can be used to query test details and display metadata for one or more test. First you will want to see all available test and their corresponding unique identifiers. Let’s run the following

buildtest inspect list
$ buildtest inspect list
                      Test Summary by id, name, buildspec                       
┏━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ id                      ┃ name                     ┃ buildspec               ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ c117384c-b1ab-4167-a905 │ variables_bash           │ /home/docs/checkouts/re │
│ -1c2a3cc7eaf8           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/tutorials/vars.y │
│                         │                          │ ml                      │
│ afe2a118-3603-4831-803c │ unskipped                │ /home/docs/checkouts/re │
│ -2ae1135792d1           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/tutorials/skip_t │
│                         │                          │ ests.yml                │
│ cb09da50-0ea1-4c02-87c1 │ hello_world              │ /home/docs/checkouts/re │
│ -aa11acdc6785           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/tutorials/hello_ │
│                         │                          │ world.yml               │
│ d3c1b507-9453-4379-8ec5 │ hello_world              │ /home/docs/checkouts/re │
│ -363c5fe791d1           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/tutorials/hello_ │
│                         │                          │ world.yml               │
│ b784ff0f-b4d7-441e-ae99 │ root_disk_usage          │ /home/docs/checkouts/re │
│ -fd16971e2193           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/general_tests/co │
│                         │                          │ nfiguration/disk_usage. │
│                         │                          │ yml                     │
│ 512934d6-9c71-411e-8f83 │ ulimit_vmsize_unlimited  │ /home/docs/checkouts/re │
│ -0d3106e8549e           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/general_tests/co │
│                         │                          │ nfiguration/ulimits.yml │
│ 356fcb67-44d8-4748-9962 │ ulimit_cputime_unlimited │ /home/docs/checkouts/re │
│ -26eb31584ec1           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/general_tests/co │
│                         │                          │ nfiguration/ulimits.yml │
│ a167e35b-66c2-40e4-93d6 │ ulimit_stacksize_unlimit │ /home/docs/checkouts/re │
│ -fc84589ef0da           │ ed                       │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/general_tests/co │
│                         │                          │ nfiguration/ulimits.yml │
│ cc3d3e50-1c19-4e88-b6c1 │ ulimit_max_user_process_ │ /home/docs/checkouts/re │
│ -93cd83de6818           │ 2048                     │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/general_tests/co │
│                         │                          │ nfiguration/ulimits.yml │
│ 8ae0ec3f-de86-4d6b-83f8 │ ulimit_filedescriptor_40 │ /home/docs/checkouts/re │
│ -3f76820f7cc1           │ 96                       │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/general_tests/co │
│                         │                          │ nfiguration/ulimits.yml │
│ 559523fb-2e95-4a06-8aa5 │ ulimit_filelock_unlimite │ /home/docs/checkouts/re │
│ -b42853db05a5           │ d                        │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/general_tests/co │
│                         │                          │ nfiguration/ulimits.yml │
│ 8e8bde7b-3513-4cdc-8d02 │ systemd_default_target   │ /home/docs/checkouts/re │
│ -59246a1f9913           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/general_tests/co │
│                         │                          │ nfiguration/systemd-def │
│                         │                          │ ault-target.yml         │
│ 94b7ff20-2284-4a0e-87db │ kernel_swapusage         │ /home/docs/checkouts/re │
│ -76507e414134           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/general_tests/co │
│                         │                          │ nfiguration/kernel_stat │
│                         │                          │ e.yml                   │
│ 15272483-09a8-4324-b1c7 │ list_of_strings_tags     │ /home/docs/checkouts/re │
│ -c015cee3cc85           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/tutorials/tags_e │
│                         │                          │ xample.yml              │
│ b4d37e54-ca9d-4729-847f │ string_tag               │ /home/docs/checkouts/re │
│ -0229e8e0bb37           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ stable/tutorials/tags_e │
│                         │                          │ xample.yml              │
└─────────────────────────┴──────────────────────────┴─────────────────────────┘

In buildtest, test are referred as builders which is in format <name>/<ID> where each test has a unique identifier separated by backslash / character. To see all builders you can run:

buildtest inspect list -b

The buildtest it command is an alias for buildtest inspect command, so we will use this command going forward. We will be using the builder notation when querying test via buildtest it name and buildtest it query. The command buildtest it name will display raw JSON record from the report file for a given test. The test names can be positional arguments so you can query multiple tests simultaneously.

Let’s run the following:

buildtest it name hello_world

The buildtest it query is used to query test records in human readable format. This command is useful once you run test via buildtest build and you want to inspect test result. buildtest can display test content, output and error file and support multiple test queries including regular expression!!

Let’s try running the following

buildtest it query -o -e -t hello_world
$ buildtest it query -o -e -t hello_world
─────────────── hello_world/d3c1b507-9453-4379-8ec5-363c5fe791d1 ───────────────
Executor: generic.local.bash
Description: hello world example
State: PASS
Returncode: 0
Runtime: 0.006705 sec
Starttime: 2024/04/16 16:47:12
Endtime: 2024/04/16 16:47:12
Command: bash hello_world_build.sh
Test Script: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/d3c1b507/hello_world.sh
Build Script: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/d3c1b507/hello_world_build.sh
Output File: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/d3c1b507/hello_world.out
Error File: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_world/d3c1b507/hello_world.err
Log File: /tmp/tmpdzcbbdmp/var/logs/buildtest_00wolj0y.log
─ Output File: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hell… ─
hello world!                                                                    
                                                                                
─ Error File: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello… ─
                                                                                
─ Test File: /tmp/tmpdzcbbdmp/var/tests/generic.local.bash/hello_world/hello_… ─
#!/usr/bin/bash                                                                 
set -eo pipefail                                                                
# Content of run section                                                        
echo "hello world!"

You can retrieve paths to given test via buildtest path that can be useful if you want to navigate to directory or list contents. By default buildtest path will retrieve root directory of test. You can retrieve output and error via buildtest path -o and buildtest path -e. Let’s try running:

buildtest path hello_world
buildtest path -o hello_world
buildtest path -e hello_world

We encourage you review Query Test Report for a detailed guide on how to query test in buildtest.

Interacting with Buildspecs

Buildtest supports several ways to interact with buildspecs, such as querying buildspec cache, validating buildspecs, showing content of buildspecs, and editing buildspecs in editor. The buildtest buildspec command contains several subcommands that we will discuss in this session. To learn more we encourage you see Buildspecs Interface for detailed guide.

The buildtest show command can be used to provide a brief help message for each subcommand and usage. This command can be useful if you want to understand how a particular command works. Let’s run buildtest show buildspec which will summarize the buildtest buildspec command.

buildtest show buildspec
$ buildtest show buildspec
                               Finding Buildspecs                               
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Command                               ┃ Description                          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ buildtest buildspec find              │ Discover and validate all buildspecs │
│                                       │ and load all validated buildspecs in │
│                                       │ cache                                │
│ buildtest buildspec find --rebuild    │ Rebuild cache file                   │
│ buildtest buildspec find --pager      │ Paginate output of buildspec cache   │
│ buildtest buildspec find --root /tmp  │ Discover buildspecs in /tmp and      │
│ --rebuild                             │ rebuild buildspec cache              │
│ buildtest buildspec find --quiet      │ Rebuild cache file but don't display │
│ --rebuild                             │ output of cache                      │
│ buildtest buildspec find --paths      │ Print all root directories for       │
│                                       │ buildspecs                           │
│ buildtest buildspec find --buildspec  │ List all available buildspecs from   │
│                                       │ cache                                │
│ buildtest buildspec find --executors  │ List all unique executors from cache │
│ buildtest buildspec find --filter     │ Filter buildspec cache based on      │
│ type=script,tags=pass                 │ type=script and  tags='pass'         │
│ buildtest buildspec find --filter     │ Filter cache by buildspec file       │
│ buildspec=<path>                      │                                      │
│ buildtest buildspec find --format     │ Format table columns by field:       │
│ name,description                      │ 'name', and 'description'            │
│ buildtest buildspec find              │ Group tests by tag name              │
│ --group-by-tags                       │                                      │
│ buildtest buildspec find              │ Group tests by executor name         │
│ --group-by-executor                   │                                      │
│ buildtest buildspec find --helpfilter │ Show all filter fields               │
│ buildtest buildspec find --helpformat │ Show all format fields               │
│ buildtest buildspec find --terse      │ Display output in terse format       │
│ buildtest buildspec find --row-count  │ Print total count of records from    │
│                                       │ the table                            │
│ buildtest buildspec find --count=5    │ Limit output of buildspec cache to 5 │
│                                       │ elements                             │
│ buildtest buildspec find invalid      │ Show invalid buildspecs              │
│ buildtest buildspec find invalid      │ Show invalid buildspecs with error   │
│ --error                               │ messages                             │
│ buildtest buildspec find invalid      │ Print total count of records from    │
│ --row-count                           │ the table                            │
└───────────────────────────────────────┴──────────────────────────────────────┘
                             Validating Buildspecs                              
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Command                               ┃ Description                          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ buildtest buildspec validate -b       │ Validate a buildspec with JSON       │
│ <file>                                │ Schema                               │
│ buildtest buildspec validate -b /tmp/ │ Validate all buildspecs in directory │
│ -x /tmp/network                       │ /tmp but exclude /tmp/network        │
│ buildtest buildspec validate -t       │ Validate all buildspecs for tagname  │
│ python -t mac                         │ 'python' and 'mac'                   │
│ buildtest buildspec validate -e       │ Validate all buildspecs for executor │
│ generic.local.bash                    │ 'generic.local.bash'                 │
└───────────────────────────────────────┴──────────────────────────────────────┘
                       Additional Features of Buildspecs                        
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Command                               ┃ Description                          ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ buildtest buildspec summary           │ Show summary of buildspec cache file │
│ buildtest buildspec summary --pager   │ Paginate the output of summary for   │
│                                       │ buildspec cache                      │
│ buildtest buildspec show python_hello │ Show content of buildspec based on   │
│                                       │ test name 'python_hello'             │
│ buildtest buildspec show python_hello │ Use color theme 'emacs' for showing  │
│ --theme emacs                         │ content of test                      │
│ buildtest buildspec show-fail         │ Show content of buildspec on all     │
│                                       │ failed tests                         │
│ buildtest buildspec show-fail         │ Show content of test 'exit1_fail'    │
│ exit1_fail                            │                                      │
│ buildtest buildspec edit-test         │ Open test 'python_hello' in editor   │
│ python_hello                          │ and validate file upon closing       │
│ buildtest buildspec edit-file         │ Open file                            │
│ $BUILDTEST_ROOT/tutorials/sleep.yml   │ $BUILDTEST_ROOT/tutorials/sleep.yml  │
│                                       │ in editor and validate file upon     │
│                                       │ closing                              │
│ buildtest buildspec maintainers find  │ Find buildspec with maintainer name  │
│ johndoe                               │ 'johndoe'                            │
│ buildtest buildspec maintainers       │ List all maintainers from buildspec  │
│                                       │ cache                                │
│ buildtest buildspec maintainers       │ Print total count of records from    │
│ --row-count                           │ the table                            │
│ buildtest buildspec maintainers       │ List all maintainers in machine      │
│ --terse --no-header                   │ readable format without header       │
│ buildtest buildspec maintainers       │ Show breakdown of maintainers by     │
│ --breakdown                           │ buildspecs                           │
└───────────────────────────────────────┴──────────────────────────────────────┘

To build the buildspec cache you will need to run the following:

buildtest buildspec find --rebuild -q

The --rebuild option will rebuild the cache and -q will supress output. If you want to see all valid buildspecs in cache you can run:

buildtest buildspec find

To retrieve all tags you can run:

buildtest buildspec find --tags

We can filter tests via --filter option which expects a key=value pair. Let’s filter by tagname python by running:

buildtest buildspec find --filter tags=python

We can format the columns using --format option where each field is comma separated. Let’s format by fields name, tags, description

buildtest buildspec find --filter tags=python --format name,tags,description

To see all filter and format fields you can use --helpfilter and --helpformat to list all fields and their description.

If you want to see a summary of the buildspec cache you can run:

buildtest buildspec summary

Buildtest has an alias buildtest bc for buildtest buildspec command so let’s use this going forward.

To validate a buildspec you can use buildtest bc validate command there are several options analogous to buildtest build for discovering buildspecs such as -b, -x, -t, -e. For instance let’s validate the following buildspecs:

buildtest bc validate -b tutorials/hello_world.yml -b general_tests/configuration
buildtest bc validate -t python

Let’s try validating an invalid buildspec so you can see what happens

buildtest bc validate -b tutorials/invalid_executor.yml
$ buildtest bc validate -b tutorials/invalid_executor.yml
─ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable… ─
"[/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/stable/tutorials/invalid_executor.yml]: Unable to find executor: badexecutor in ['generic.local.bash', 'generic.local.sh', 'generic.local.csh', 'generic.local.zsh']"


1 buildspecs failed to validate

To see content of buildspec you can use buildtest bc show which expects name of test. Note tab completion is supported.

Let’s run the following:

buildtest bc show sleep hello_world

Buildtest uses rich python library for coloring which is used extensively throughout the buildtest output. Rich supports several built-in themes that can be used for your preference. The buildtest bc show --theme <THEME> can be used select a color theme.

Currently, buildtest supports the following themes, feel free to tab complete:

   buildtest bc show --theme
abap                borland             emacs               gruvbox-dark        lovelace            native              paraiso-light       sas                 stata-dark          vs
algol               bw                  friendly            gruvbox-light       manni               nord                pastie              solarized-dark      stata-light         xcode
algol_nu            colorful            friendly_grayscale  igor                material            nord-darker         perldoc             solarized-light     tango               zenburn
arduino             default             fruity              inkpot              monokai             one-dark            rainbow_dash        staroffice          trac
autumn              dracula             github-dark         lilypond            murphy              paraiso-dark        rrt                 stata               vim

Let’s try running the same example with emacs theme:

buildtest bc show --theme emacs sleep

If you want to see list of invalid buildspecs you can run:

buildtest bc find invalid

Note, if you fix your invalid buildspec, buildtest will have no way of knowing if buildspec is valid until you rebuild the buildspec cache buildtest bc find --rebuild.

Query Details from Buildtest Configuration

In order to use buildtest, you need to configure buildtest. We will not discuss how to configure buildtest in this tutorial, but show how you can interact with configuration file via command line.

Buildtest provides a default configuration file that is sufficient to get started. To view path to configuration file you can run:

buildtest config path

We have an alias buildtest cg for buildtest config command. If you want to view content of configuration file you can run

buildtest cg view
$ buildtest cg view
───────────────────────── /tmp/tmpdzcbbdmp/config.yml ──────────────────────────
   1 system:
   2   generic:
   3     # specify a list of hostnames that is a regular expression where buildtest can run.
   4     hostnames: ['.*']
   5     # system description
   6     description: Generic System
   7     # specify module system to use. Supported module systems are [lmod, environment-modules, none]
   8     moduletool: none
   9 
  10     # specify size of job pool (https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool). This will configure the number of processes that can run in parallel.
  11     # If not specified then buildtest will use all available cores on the system.
  12     poolsize: 1
  13 
  14     # maximum number of jobs that can run in parallel. If not specified, buildtest will run all jobs in parallel.
  15     #max_jobs: 1
  16 
  17     # test timeout in number of seconds
  18     # timeout: 3600
  19 
  20     # enable pagination for buildtest
  21     pager: false
  22 
  23     # options for buildtest buildspec find command
  24     buildspecs:
  25       # determine whether to rebuild buildspec cache
  26       rebuild: false
  27       # determine number of records to display
  28       count: 15
  29 
  30       # specify format fields
  31       #format: name,description
  32 
  33       # display output in terse mode
  34       terse: false
  35 
  36       # list of paths to search for buildspecs
  37       #root: ["$BUILDTEST_ROOT/tutorials", "$BUILDTEST_ROOT/examples"]
  38 
  39     # options for buildtest report command
  40     report:
  41       # number of records to display
  42       count: 25
  43       # display output in terse mode
  44       terse: false
  45       # specify format fields
  46       format: name,id,state,runtime,returncode
  47 
  48     # start of executor configuration
  49     executors:
  50       # local executor is used to submit jobs on local machine. In this example we have 4 executors: bash, sh, csh, zsh that will submit jobs using bash, sh, csh, zsh shell respectively.
  51       local:
  52         bash:
  53           description: submit jobs on local machine using bash shell
  54           shell: bash
  55         sh:
  56           description: submit jobs on local machine using sh shell
  57           shell: sh
  58         csh:
  59           description: submit jobs on local machine using csh shell
  60           shell: csh
  61         zsh:
  62           description: submit jobs on local machine using zsh shell
  63           shell: zsh
  64     # specify compiler declaration
  65     compilers:
  66       compiler:
  67         # declaration of all gcc compilers
  68         gcc:
  69           # name of compiler
  70           builtin_gcc:
  71             cc: gcc
  72             fc: gfortran
  73             cxx: g++
  74     # specify CDASH configuration when using 'buildtest cdash upload'
  75     cdash:
  76       # CDASH server
  77       url: https://my.cdash.org/
  78       # name of CDASH project where to push test reports
  79       project: buildtest
  80       # specify the site name which should generally by name of your HPC system. This is used by CDASH to group test results by site
  81       site: generic
  82       # specify the build name which is used to group test results by build name
  83       buildname: tutorials
  84

We also support color themes (buildtest cg view --theme <theme>) when showing content of buildtest configuration.

Buildtest configuration file defines one or more executors that are used when writing test. Every test must be run by an executor. To retrieve all executors in a flat-listing you can run the following

buildtest cg executors list
$ buildtest cg executors list
generic.local.bash
generic.local.sh
generic.local.csh
generic.local.zsh

Buildtest can show executor details in JSON and YAML format, you can fetch the details by running the following

buildtest cg executors list --json
$ buildtest cg executors list --json
{
  "executors": {
    "local": {
      "bash": {
        "description": "submit jobs on local machine using bash shell",
        "shell": "bash"
      },
      "sh": {
        "description": "submit jobs on local machine using sh shell",
        "shell": "sh"
      },
      "csh": {
        "description": "submit jobs on local machine using csh shell",
        "shell": "csh"
      },
      "zsh": {
        "description": "submit jobs on local machine using zsh shell",
        "shell": "zsh"
      }
    }
  }
}
buildtest cg executors list --yaml
$ buildtest cg executors list --yaml
executors:
  local:
    bash:
      description: submit jobs on local machine using bash shell
      shell: bash
    csh:
      description: submit jobs on local machine using csh shell
      shell: csh
    sh:
      description: submit jobs on local machine using sh shell
      shell: sh
    zsh:
      description: submit jobs on local machine using zsh shell
      shell: zsh