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-24085344-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2024/04/16 17:02:37                                      │
│ 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/tmpn1m7r6ej/config.yml                              │
│ Test Directory:     /tmp/tmpn1m7r6ej/var/tests                               │
│ Report File:        /tmp/tmpn1m7r6ej/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/devel/t ║
║ utorials/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/devel/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/9584 │        │ local.ba │          │       │       │ world    │ ocs/che │
│ ff1c     │        │ sh       │          │       │       │ example  │ ckouts/ │
│          │        │          │          │       │       │          │ readthe │
│          │        │          │          │       │       │          │ docs.or │
│          │        │          │          │       │       │          │ g/user_ │
│          │        │          │          │       │       │          │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/tu │
│          │        │          │          │       │       │          │ torials │
│          │        │          │          │       │       │          │ /hello_ │
│          │        │          │          │       │       │          │ world.y │
│          │        │          │          │       │       │          │ ml      │
└──────────┴────────┴──────────┴──────────┴───────┴───────┴──────────┴─────────┘
──────────────────────────────── Building Test ─────────────────────────────────
hello_world/9584ff1c: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/9584ff1c
──────────────────────────────── Running Tests ─────────────────────────────────
Spawning 1 processes for processing builders
───────────────────────────────── Iteration 1 ──────────────────────────────────
hello_world/9584ff1c does not have any dependencies adding test to queue
Builders Eligible to Run
┏━━━━━━━━━━━━━━━━━━━━━━┓
┃ Builder              ┃
┡━━━━━━━━━━━━━━━━━━━━━━┩
│ hello_world/9584ff1c │
└──────────────────────┘
hello_world/9584ff1c: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/9584ff1c/stage
hello_world/9584ff1c: Running Test via command: bash hello_world_build.sh
hello_world/9584ff1c: Test completed in 0.005939 seconds with returncode: 0
hello_world/9584ff1c: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/9584ff1c/hello_world.out
hello_world/9584ff1c: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/9584ff1c/hello_world.err
                                Test Summary                                 
┏━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┓
┃ builder              ┃ executor           ┃ status ┃ returncode ┃ runtime ┃
┡━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━┩
│ hello_world/9584ff1c │ 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/tmpn1m7r6ej/var/report.json
Writing Logfile to /tmp/tmpn1m7r6ej/var/logs/buildtest_y5ztn34o.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-24085344-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2024/04/16 17:02:38                                      │
│ 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/tmpn1m7r6ej/config.yml                              │
│ Test Directory:     /tmp/tmpn1m7r6ej/var/tests                               │
│ Report File:        /tmp/tmpn1m7r6ej/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/devel/t ║
║ utorials/hello_world.yml                                                     ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/g ║
║ eneral_tests/configuration/kernel_state.yml                                  ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/g ║
║ eneral_tests/configuration/disk_usage.yml                                    ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/g ║
║ eneral_tests/configuration/systemd-default-target.yml                        ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/g ║
║ eneral_tests/configuration/ulimits.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/devel/tutorials/hello_world.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/general_tests/configuration/kernel_state.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/general_tests/configuration/disk_usage.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/general_tests/configuration/systemd-default-target.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/general_tests/configuration/ulimits.yml: VALID
Total builder objects created: 10
                            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/a836 │        │ local.ba │          │       │       │ world    │ ocs/che │
│ d39b     │        │ sh       │          │       │       │ example  │ ckouts/ │
│          │        │          │          │       │       │          │ readthe │
│          │        │          │          │       │       │          │ docs.or │
│          │        │          │          │       │       │          │ g/user_ │
│          │        │          │          │       │       │          │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/tu │
│          │        │          │          │       │       │          │ torials │
│          │        │          │          │       │       │          │ /hello_ │
│          │        │          │          │       │       │          │ world.y │
│          │        │          │          │       │       │          │ ml      │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ kernel_s │ script │ generic. │ None     │ None  │ None  │ Retrieve │ /home/d │
│ wapusage │        │ local.ba │          │       │       │ Kernel   │ ocs/che │
│ /ce0d07d │        │ sh       │          │       │       │ Swap     │ ckouts/ │
│ c        │        │          │          │       │       │ Usage    │ readthe │
│          │        │          │          │       │       │          │ docs.or │
│          │        │          │          │       │       │          │ g/user_ │
│          │        │          │          │       │       │          │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/ge │
│          │        │          │          │       │       │          │ neral_t │
│          │        │          │          │       │       │          │ ests/co │
│          │        │          │          │       │       │          │ nfigura │
│          │        │          │          │       │       │          │ tion/ke │
│          │        │          │          │       │       │          │ rnel_st │
│          │        │          │          │       │       │          │ ate.yml │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ root_dis │ script │ generic. │ None     │ None  │ None  │ Check    │ /home/d │
│ k_usage/ │        │ local.ba │          │       │       │ root     │ ocs/che │
│ 2d1c88aa │        │ sh       │          │       │       │ disk     │ ckouts/ │
│          │        │          │          │       │       │ usage    │ readthe │
│          │        │          │          │       │       │ and      │ docs.or │
│          │        │          │          │       │       │ report   │ g/user_ │
│          │        │          │          │       │       │ if it    │ builds/ │
│          │        │          │          │       │       │ exceeds  │ buildte │
│          │        │          │          │       │       │ threshol │ st/chec │
│          │        │          │          │       │       │ d        │ kouts/d │
│          │        │          │          │       │       │          │ evel/ge │
│          │        │          │          │       │       │          │ neral_t │
│          │        │          │          │       │       │          │ ests/co │
│          │        │          │          │       │       │          │ nfigura │
│          │        │          │          │       │       │          │ tion/di │
│          │        │          │          │       │       │          │ sk_usag │
│          │        │          │          │       │       │          │ e.yml   │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ systemd_ │ script │ generic. │ None     │ None  │ None  │ check if │ /home/d │
│ default_ │        │ local.ba │          │       │       │ default  │ ocs/che │
│ target/1 │        │ sh       │          │       │       │ target   │ ckouts/ │
│ e06724f  │        │          │          │       │       │ is       │ readthe │
│          │        │          │          │       │       │ multi-us │ docs.or │
│          │        │          │          │       │       │ er.targe │ g/user_ │
│          │        │          │          │       │       │ t        │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/ge │
│          │        │          │          │       │       │          │ neral_t │
│          │        │          │          │       │       │          │ ests/co │
│          │        │          │          │       │       │          │ nfigura │
│          │        │          │          │       │       │          │ tion/sy │
│          │        │          │          │       │       │          │ stemd-d │
│          │        │          │          │       │       │          │ efault- │
│          │        │          │          │       │       │          │ target. │
│          │        │          │          │       │       │          │ yml     │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_f │ script │ generic. │ None     │ None  │ None  │ Check if │ /home/d │
│ ilelock_ │        │ local.ba │          │       │       │ file     │ ocs/che │
│ unlimite │        │ sh       │          │       │       │ lock is  │ ckouts/ │
│ d/ab8dd1 │        │          │          │       │       │ set to   │ readthe │
│ 42       │        │          │          │       │       │ unlimite │ docs.or │
│          │        │          │          │       │       │ d in     │ g/user_ │
│          │        │          │          │       │       │ ulimits  │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/ge │
│          │        │          │          │       │       │          │ neral_t │
│          │        │          │          │       │       │          │ ests/co │
│          │        │          │          │       │       │          │ nfigura │
│          │        │          │          │       │       │          │ tion/ul │
│          │        │          │          │       │       │          │ imits.y │
│          │        │          │          │       │       │          │ ml      │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_c │ script │ generic. │ None     │ None  │ None  │ Check if │ /home/d │
│ putime_u │        │ local.ba │          │       │       │ cputime  │ ocs/che │
│ nlimited │        │ sh       │          │       │       │ is set   │ ckouts/ │
│ /52c95dc │        │          │          │       │       │ to       │ readthe │
│ 7        │        │          │          │       │       │ unlimite │ docs.or │
│          │        │          │          │       │       │ d in     │ g/user_ │
│          │        │          │          │       │       │ ulimits  │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/ge │
│          │        │          │          │       │       │          │ neral_t │
│          │        │          │          │       │       │          │ ests/co │
│          │        │          │          │       │       │          │ nfigura │
│          │        │          │          │       │       │          │ tion/ul │
│          │        │          │          │       │       │          │ imits.y │
│          │        │          │          │       │       │          │ ml      │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_s │ script │ generic. │ None     │ None  │ None  │ Check if │ /home/d │
│ tacksize │        │ local.ba │          │       │       │ stack    │ ocs/che │
│ _unlimit │        │ sh       │          │       │       │ size is  │ ckouts/ │
│ ed/c58c5 │        │          │          │       │       │ set to   │ readthe │
│ 18a      │        │          │          │       │       │ unlimite │ docs.or │
│          │        │          │          │       │       │ d in     │ g/user_ │
│          │        │          │          │       │       │ ulimits  │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/ge │
│          │        │          │          │       │       │          │ neral_t │
│          │        │          │          │       │       │          │ ests/co │
│          │        │          │          │       │       │          │ nfigura │
│          │        │          │          │       │       │          │ tion/ul │
│          │        │          │          │       │       │          │ imits.y │
│          │        │          │          │       │       │          │ ml      │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_v │ script │ generic. │ None     │ None  │ None  │ Check    │ /home/d │
│ msize_un │        │ local.ba │          │       │       │ virtual  │ ocs/che │
│ limited/ │        │ sh       │          │       │       │ memory   │ ckouts/ │
│ 0aca6926 │        │          │          │       │       │ size and │ readthe │
│          │        │          │          │       │       │ check if │ docs.or │
│          │        │          │          │       │       │ its set  │ g/user_ │
│          │        │          │          │       │       │ to       │ builds/ │
│          │        │          │          │       │       │ unlimite │ buildte │
│          │        │          │          │       │       │ d        │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/ge │
│          │        │          │          │       │       │          │ neral_t │
│          │        │          │          │       │       │          │ ests/co │
│          │        │          │          │       │       │          │ nfigura │
│          │        │          │          │       │       │          │ tion/ul │
│          │        │          │          │       │       │          │ imits.y │
│          │        │          │          │       │       │          │ ml      │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_f │ script │ generic. │ None     │ None  │ None  │ Check if │ /home/d │
│ iledescr │        │ local.ba │          │       │       │ open     │ ocs/che │
│ iptor_40 │        │ sh       │          │       │       │ file     │ ckouts/ │
│ 96/f7bb5 │        │          │          │       │       │ descript │ readthe │
│ 0d1      │        │          │          │       │       │ ors      │ docs.or │
│          │        │          │          │       │       │ limit is │ g/user_ │
│          │        │          │          │       │       │ set to   │ builds/ │
│          │        │          │          │       │       │ 4096     │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/ge │
│          │        │          │          │       │       │          │ neral_t │
│          │        │          │          │       │       │          │ ests/co │
│          │        │          │          │       │       │          │ nfigura │
│          │        │          │          │       │       │          │ tion/ul │
│          │        │          │          │       │       │          │ imits.y │
│          │        │          │          │       │       │          │ ml      │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ ulimit_m │ script │ generic. │ None     │ None  │ None  │ Check    │ /home/d │
│ ax_user_ │        │ local.ba │          │       │       │ max      │ ocs/che │
│ process_ │        │ sh       │          │       │       │ number   │ ckouts/ │
│ 2048/f0b │        │          │          │       │       │ of user  │ readthe │
│ d30a2    │        │          │          │       │       │ process  │ docs.or │
│          │        │          │          │       │       │ limit is │ g/user_ │
│          │        │          │          │       │       │ set to   │ builds/ │
│          │        │          │          │       │       │ 2048     │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/ge │
│          │        │          │          │       │       │          │ neral_t │
│          │        │          │          │       │       │          │ ests/co │
│          │        │          │          │       │       │          │ nfigura │
│          │        │          │          │       │       │          │ tion/ul │
│          │        │          │          │       │       │          │ imits.y │
│          │        │          │          │       │       │          │ ml      │
└──────────┴────────┴──────────┴──────────┴───────┴───────┴──────────┴─────────┘
──────────────────────────────── Building Test ─────────────────────────────────
hello_world/a836d39b: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/a836d39b
kernel_swapusage/ce0d07dc: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/kernel_state/kernel_swapusage/ce0d07dc
root_disk_usage/2d1c88aa: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/disk_usage/root_disk_usage/2d1c88aa
systemd_default_target/1e06724f: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/systemd-default-target/systemd_default_target/1e06724f
ulimit_filelock_unlimited/ab8dd142: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimited/ab8dd142
ulimit_cputime_unlimited/52c95dc7: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/52c95dc7
ulimit_stacksize_unlimited/c58c518a: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimited/c58c518a
ulimit_vmsize_unlimited/0aca6926: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/0aca6926
ulimit_filedescriptor_4096/f7bb50d1: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/f7bb50d1
ulimit_max_user_process_2048/f0bd30a2: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/f0bd30a2
──────────────────────────────── Running Tests ─────────────────────────────────
Spawning 1 processes for processing builders
───────────────────────────────── Iteration 1 ──────────────────────────────────
ulimit_cputime_unlimited/52c95dc7 does not have any dependencies adding test to queue
ulimit_vmsize_unlimited/0aca6926 does not have any dependencies adding test to queue
systemd_default_target/1e06724f does not have any dependencies adding test to queue
ulimit_filedescriptor_4096/f7bb50d1 does not have any dependencies adding test to queue
root_disk_usage/2d1c88aa does not have any dependencies adding test to queue
hello_world/a836d39b does not have any dependencies adding test to queue
ulimit_filelock_unlimited/ab8dd142 does not have any dependencies adding test to queue
kernel_swapusage/ce0d07dc does not have any dependencies adding test to queue
ulimit_stacksize_unlimited/c58c518a does not have any dependencies adding test to queue
ulimit_max_user_process_2048/f0bd30a2 does not have any dependencies adding test to queue
        Builders Eligible to Run         
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Builder                               ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ ulimit_cputime_unlimited/52c95dc7     │
│ ulimit_vmsize_unlimited/0aca6926      │
│ systemd_default_target/1e06724f       │
│ ulimit_filedescriptor_4096/f7bb50d1   │
│ root_disk_usage/2d1c88aa              │
│ hello_world/a836d39b                  │
│ ulimit_filelock_unlimited/ab8dd142    │
│ kernel_swapusage/ce0d07dc             │
│ ulimit_stacksize_unlimited/c58c518a   │
│ ulimit_max_user_process_2048/f0bd30a2 │
└───────────────────────────────────────┘
ulimit_cputime_unlimited/52c95dc7: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/52c95dc7/stage
ulimit_cputime_unlimited/52c95dc7: Running Test via command: bash ulimit_cputime_unlimited_build.sh
ulimit_cputime_unlimited/52c95dc7: Test completed in 0.005968 seconds with returncode: 0
ulimit_cputime_unlimited/52c95dc7: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/52c95dc7/ulimit_cputime_unlimited.out
ulimit_cputime_unlimited/52c95dc7: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/52c95dc7/ulimit_cputime_unlimited.err
ulimit_cputime_unlimited/52c95dc7: performing regular expression - '^unlimited$' on file: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/52c95dc7/ulimit_cputime_unlimited.out
ulimit_cputime_unlimited/52c95dc7: Regular Expression Match - Success!
ulimit_vmsize_unlimited/0aca6926: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/0aca6926/stage
ulimit_vmsize_unlimited/0aca6926: Running Test via command: bash ulimit_vmsize_unlimited_build.sh
ulimit_vmsize_unlimited/0aca6926: Test completed in 0.005497 seconds with returncode: 0
ulimit_vmsize_unlimited/0aca6926: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/0aca6926/ulimit_vmsize_unlimited.out
ulimit_vmsize_unlimited/0aca6926: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/0aca6926/ulimit_vmsize_unlimited.err
ulimit_vmsize_unlimited/0aca6926: performing regular expression - '^unlimited$' on file: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/0aca6926/ulimit_vmsize_unlimited.out
ulimit_vmsize_unlimited/0aca6926: Regular Expression Match - Success!
systemd_default_target/1e06724f: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/systemd-default-target/systemd_default_target/1e06724f/stage
systemd_default_target/1e06724f: Running Test via command: bash systemd_default_target_build.sh
systemd_default_target/1e06724f: failed to submit job with returncode: 1
────────────── Error Message for systemd_default_target/1e06724f ───────────────

systemd_default_target/1e06724f: Detected failure in running test, will attempt to retry test: 1 times
systemd_default_target/1e06724f: Run - 1/1
systemd_default_target/1e06724f: Running Test via command: bash systemd_default_target_build.sh
systemd_default_target/1e06724f: failed to submit job with returncode: 1
systemd_default_target/1e06724f: Test completed in 0.164799 seconds with returncode: 1
systemd_default_target/1e06724f: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/systemd-default-target/systemd_default_target/1e06724f/systemd_default_target.out
systemd_default_target/1e06724f: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/systemd-default-target/systemd_default_target/1e06724f/systemd_default_target.err
ulimit_filedescriptor_4096/f7bb50d1: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/f7bb50d1/stage
ulimit_filedescriptor_4096/f7bb50d1: Running Test via command: bash ulimit_filedescriptor_4096_build.sh
ulimit_filedescriptor_4096/f7bb50d1: Test completed in 0.005418 seconds with returncode: 0
ulimit_filedescriptor_4096/f7bb50d1: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/f7bb50d1/ulimit_filedescriptor_4096.out
ulimit_filedescriptor_4096/f7bb50d1: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/f7bb50d1/ulimit_filedescriptor_4096.err
ulimit_filedescriptor_4096/f7bb50d1: performing regular expression - '^4096$' on file: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/f7bb50d1/ulimit_filedescriptor_4096.out
ulimit_filedescriptor_4096/f7bb50d1: Regular Expression Match - Failed!
root_disk_usage/2d1c88aa: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/disk_usage/root_disk_usage/2d1c88aa/stage
root_disk_usage/2d1c88aa: Running Test via command: bash root_disk_usage_build.sh
root_disk_usage/2d1c88aa: Test completed in 0.010957 seconds with returncode: 0
root_disk_usage/2d1c88aa: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/disk_usage/root_disk_usage/2d1c88aa/root_disk_usage.out
root_disk_usage/2d1c88aa: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/disk_usage/root_disk_usage/2d1c88aa/root_disk_usage.err
hello_world/a836d39b: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/a836d39b/stage
hello_world/a836d39b: Running Test via command: bash hello_world_build.sh
hello_world/a836d39b: Test completed in 0.005626 seconds with returncode: 0
hello_world/a836d39b: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/a836d39b/hello_world.out
hello_world/a836d39b: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/a836d39b/hello_world.err
ulimit_filelock_unlimited/ab8dd142: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimited/ab8dd142/stage
ulimit_filelock_unlimited/ab8dd142: Running Test via command: bash ulimit_filelock_unlimited_build.sh
ulimit_filelock_unlimited/ab8dd142: Test completed in 0.005473 seconds with returncode: 0
ulimit_filelock_unlimited/ab8dd142: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimited/ab8dd142/ulimit_filelock_unlimited.out
ulimit_filelock_unlimited/ab8dd142: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimited/ab8dd142/ulimit_filelock_unlimited.err
ulimit_filelock_unlimited/ab8dd142: performing regular expression - '^unlimited$' on file: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimited/ab8dd142/ulimit_filelock_unlimited.out
ulimit_filelock_unlimited/ab8dd142: Regular Expression Match - Success!
kernel_swapusage/ce0d07dc: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/kernel_state/kernel_swapusage/ce0d07dc/stage
kernel_swapusage/ce0d07dc: Running Test via command: bash kernel_swapusage_build.sh
kernel_swapusage/ce0d07dc: failed to submit job with returncode: 255
───────────────── Error Message for kernel_swapusage/ce0d07dc ──────────────────
sysctl: cannot stat /proc/sys/kernel/swapusage: No such file or directory

kernel_swapusage/ce0d07dc: Detected failure in running test, will attempt to retry test: 1 times
kernel_swapusage/ce0d07dc: Run - 1/1
kernel_swapusage/ce0d07dc: Running Test via command: bash kernel_swapusage_build.sh
kernel_swapusage/ce0d07dc: failed to submit job with returncode: 255
kernel_swapusage/ce0d07dc: Test completed in 0.059745 seconds with returncode: 255
kernel_swapusage/ce0d07dc: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/kernel_state/kernel_swapusage/ce0d07dc/kernel_swapusage.out
kernel_swapusage/ce0d07dc: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/kernel_state/kernel_swapusage/ce0d07dc/kernel_swapusage.err
ulimit_stacksize_unlimited/c58c518a: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimited/c58c518a/stage
ulimit_stacksize_unlimited/c58c518a: Running Test via command: bash ulimit_stacksize_unlimited_build.sh
ulimit_stacksize_unlimited/c58c518a: Test completed in 0.008157 seconds with returncode: 0
ulimit_stacksize_unlimited/c58c518a: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimited/c58c518a/ulimit_stacksize_unlimited.out
ulimit_stacksize_unlimited/c58c518a: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimited/c58c518a/ulimit_stacksize_unlimited.err
ulimit_stacksize_unlimited/c58c518a: performing regular expression - '^unlimited$' on file: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimited/c58c518a/ulimit_stacksize_unlimited.out
ulimit_stacksize_unlimited/c58c518a: Regular Expression Match - Failed!
ulimit_max_user_process_2048/f0bd30a2: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/f0bd30a2/stage
ulimit_max_user_process_2048/f0bd30a2: Running Test via command: bash ulimit_max_user_process_2048_build.sh
ulimit_max_user_process_2048/f0bd30a2: Test completed in 0.005673 seconds with returncode: 0
ulimit_max_user_process_2048/f0bd30a2: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/f0bd30a2/ulimit_max_user_process_2048.out
ulimit_max_user_process_2048/f0bd30a2: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/f0bd30a2/ulimit_max_user_process_2048.err
ulimit_max_user_process_2048/f0bd30a2: performing regular expression - '^2048$' on file: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/f0bd30a2/ulimit_max_user_process_2048.out
ulimit_max_user_process_2048/f0bd30a2: Regular Expression Match - Failed!
                                  Test Summary                                  
┏━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┓
┃ builder                 ┃ executor           ┃ status ┃ returncode ┃ runtime ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━┩
│ kernel_swapusage/ce0d07 │ generic.local.bash │ FAIL   │ 255        │ 0.060   │
│ dc                      │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ systemd_default_target/ │ generic.local.bash │ FAIL   │ 1          │ 0.165   │
│ 1e06724f                │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_vmsize_unlimited │ generic.local.bash │ PASS   │ 0          │ 0.005   │
│ /0aca6926               │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ root_disk_usage/2d1c88a │ generic.local.bash │ PASS   │ 0          │ 0.011   │
│ a                       │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_filelock_unlimit │ generic.local.bash │ PASS   │ 0          │ 0.005   │
│ ed/ab8dd142             │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_filedescriptor_4 │ generic.local.bash │ FAIL   │ 0          │ 0.005   │
│ 096/f7bb50d1            │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ hello_world/a836d39b    │ generic.local.bash │ PASS   │ 0          │ 0.006   │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_max_user_process │ generic.local.bash │ FAIL   │ 0          │ 0.006   │
│ _2048/f0bd30a2          │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_cputime_unlimite │ generic.local.bash │ PASS   │ 0          │ 0.006   │
│ d/52c95dc7              │                    │        │            │         │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ ulimit_stacksize_unlimi │ generic.local.bash │ FAIL   │ 0          │ 0.008   │
│ ted/c58c518a            │                    │        │            │         │
└─────────────────────────┴────────────────────┴────────┴────────────┴─────────┘



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


Adding 10 test results to report file: /tmp/tmpn1m7r6ej/var/report.json
Writing Logfile to /tmp/tmpn1m7r6ej/var/logs/buildtest_0owznq_m.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-24085344-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2024/04/16 17:02:40                                      │
│ 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/tmpn1m7r6ej/config.yml                              │
│ Test Directory:     /tmp/tmpn1m7r6ej/var/tests                               │
│ Report File:        /tmp/tmpn1m7r6ej/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/devel/t ║
║ utorials/tags_example.yml                                                    ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ Total: 1                                                                     ║
╚══════════════════════════════════════════════════════════════════════════════╝
                           Buildspecs By Tag=network                            
╔══════════════════════════════════════════════════════════════════════════════╗
║ buildspec                                                                    ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/t ║
║ utorials/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/devel/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/3ebb1 │        │ local.ba │          │       │       │ be a     │ ocs/che │
│ 959      │        │ sh       │          │       │       │ string   │ ckouts/ │
│          │        │          │          │       │       │          │ readthe │
│          │        │          │          │       │       │          │ docs.or │
│          │        │          │          │       │       │          │ g/user_ │
│          │        │          │          │       │       │          │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/tu │
│          │        │          │          │       │       │          │ torials │
│          │        │          │          │       │       │          │ /tags_e │
│          │        │          │          │       │       │          │ xample. │
│          │        │          │          │       │       │          │ yml     │
├──────────┼────────┼──────────┼──────────┼───────┼───────┼──────────┼─────────┤
│ list_of_ │ script │ generic. │ None     │ None  │ None  │ tags can │ /home/d │
│ strings_ │        │ local.ba │          │       │       │ be a     │ ocs/che │
│ tags/e70 │        │ sh       │          │       │       │ list of  │ ckouts/ │
│ 791c2    │        │          │          │       │       │ strings  │ readthe │
│          │        │          │          │       │       │          │ docs.or │
│          │        │          │          │       │       │          │ g/user_ │
│          │        │          │          │       │       │          │ builds/ │
│          │        │          │          │       │       │          │ buildte │
│          │        │          │          │       │       │          │ st/chec │
│          │        │          │          │       │       │          │ kouts/d │
│          │        │          │          │       │       │          │ evel/tu │
│          │        │          │          │       │       │          │ torials │
│          │        │          │          │       │       │          │ /tags_e │
│          │        │          │          │       │       │          │ xample. │
│          │        │          │          │       │       │          │ yml     │
└──────────┴────────┴──────────┴──────────┴───────┴───────┴──────────┴─────────┘
──────────────────────────────── Building Test ─────────────────────────────────
string_tag/3ebb1959: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/tags_example/string_tag/3ebb1959
list_of_strings_tags/e70791c2: Creating Test Directory: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/tags_example/list_of_strings_tags/e70791c2
──────────────────────────────── Running Tests ─────────────────────────────────
Spawning 1 processes for processing builders
───────────────────────────────── Iteration 1 ──────────────────────────────────
list_of_strings_tags/e70791c2 does not have any dependencies adding test to queue
string_tag/3ebb1959 does not have any dependencies adding test to queue
    Builders Eligible to Run     
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Builder                       ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ string_tag/3ebb1959           │
│ list_of_strings_tags/e70791c2 │
└───────────────────────────────┘
string_tag/3ebb1959: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/tags_example/string_tag/3ebb1959/stage
string_tag/3ebb1959: Running Test via command: bash string_tag_build.sh
string_tag/3ebb1959: Test completed in 0.006565 seconds with returncode: 0
string_tag/3ebb1959: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/tags_example/string_tag/3ebb1959/string_tag.out
string_tag/3ebb1959: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/tags_example/string_tag/3ebb1959/string_tag.err
list_of_strings_tags/e70791c2: Current Working Directory : /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/tags_example/list_of_strings_tags/e70791c2/stage
list_of_strings_tags/e70791c2: Running Test via command: bash list_of_strings_tags_build.sh
list_of_strings_tags/e70791c2: Test completed in 3.02944 seconds with returncode: 0
list_of_strings_tags/e70791c2: Writing output file -  /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/tags_example/list_of_strings_tags/e70791c2/list_of_strings_tags.out
list_of_strings_tags/e70791c2: Writing error file - /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/tags_example/list_of_strings_tags/e70791c2/list_of_strings_tags.err
                                  Test Summary                                  
┏━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┓
┃ builder                 ┃ executor           ┃ status ┃ returncode ┃ runtime ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━┩
│ string_tag/3ebb1959     │ generic.local.bash │ PASS   │ 0          │ 0.007   │
├─────────────────────────┼────────────────────┼────────┼────────────┼─────────┤
│ list_of_strings_tags/e7 │ generic.local.bash │ PASS   │ 0          │ 3.029   │
│ 0791c2                  │                    │        │            │         │
└─────────────────────────┴────────────────────┴────────┴────────────┴─────────┘



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


Adding 2 test results to report file: /tmp/tmpn1m7r6ej/var/report.json
Writing Logfile to /tmp/tmpn1m7r6ej/var/logs/buildtest_i3se2_m1.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/tmpn1m7r6ej/var/report.json                  
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ name                                ┃ id              ┃ tags                 ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ string_tag                          │ 3ebb1959        │ network              │
├─────────────────────────────────────┼─────────────────┼──────────────────────┤
│ list_of_strings_tags                │ e70791c2        │ network ping         │
└─────────────────────────────────────┴─────────────────┴──────────────────────┘

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               ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ ac5ebc6a-0093-427b-a028 │ variables_bash           │ /home/docs/checkouts/re │
│ -4bacfcc23b8d           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/tutorials/vars.ym │
│                         │                          │ l                       │
│ 792e36b0-499c-441e-ad34 │ unskipped                │ /home/docs/checkouts/re │
│ -e5ad2c58f2e1           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/tutorials/skip_te │
│                         │                          │ sts.yml                 │
│ 9584ff1c-8a79-4d06-a5d1 │ hello_world              │ /home/docs/checkouts/re │
│ -36c2fa57fbd5           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/tutorials/hello_w │
│                         │                          │ orld.yml                │
│ a836d39b-1bfe-4026-be41 │ hello_world              │ /home/docs/checkouts/re │
│ -e2a3c3bbd1c9           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/tutorials/hello_w │
│                         │                          │ orld.yml                │
│ ce0d07dc-3593-48f5-8796 │ kernel_swapusage         │ /home/docs/checkouts/re │
│ -374cfb2e65d3           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/general_tests/con │
│                         │                          │ figuration/kernel_state │
│                         │                          │ .yml                    │
│ 1e06724f-5ef7-493b-8d61 │ systemd_default_target   │ /home/docs/checkouts/re │
│ -ba3f1a734a4d           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/general_tests/con │
│                         │                          │ figuration/systemd-defa │
│                         │                          │ ult-target.yml          │
│ 0aca6926-0508-41c4-b662 │ ulimit_vmsize_unlimited  │ /home/docs/checkouts/re │
│ -401d23cfecff           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/general_tests/con │
│                         │                          │ figuration/ulimits.yml  │
│ ab8dd142-6978-48e3-85f8 │ ulimit_filelock_unlimite │ /home/docs/checkouts/re │
│ -d80c3f6238bb           │ d                        │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/general_tests/con │
│                         │                          │ figuration/ulimits.yml  │
│ f7bb50d1-82e6-48ac-b5c2 │ ulimit_filedescriptor_40 │ /home/docs/checkouts/re │
│ -2df16c34451c           │ 96                       │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/general_tests/con │
│                         │                          │ figuration/ulimits.yml  │
│ f0bd30a2-3518-414c-aa7b │ ulimit_max_user_process_ │ /home/docs/checkouts/re │
│ -f394e0a586c9           │ 2048                     │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/general_tests/con │
│                         │                          │ figuration/ulimits.yml  │
│ 52c95dc7-051c-4c00-a778 │ ulimit_cputime_unlimited │ /home/docs/checkouts/re │
│ -135b6009e8ab           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/general_tests/con │
│                         │                          │ figuration/ulimits.yml  │
│ c58c518a-b160-4946-83aa │ ulimit_stacksize_unlimit │ /home/docs/checkouts/re │
│ -82fd6634836c           │ ed                       │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/general_tests/con │
│                         │                          │ figuration/ulimits.yml  │
│ 2d1c88aa-95d6-4725-b838 │ root_disk_usage          │ /home/docs/checkouts/re │
│ -d3f9507a4cc1           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/general_tests/con │
│                         │                          │ figuration/disk_usage.y │
│                         │                          │ ml                      │
│ 3ebb1959-a6d4-4fdc-8f08 │ string_tag               │ /home/docs/checkouts/re │
│ -544f715c4717           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/tutorials/tags_ex │
│                         │                          │ ample.yml               │
│ e70791c2-4e51-4d33-be19 │ list_of_strings_tags     │ /home/docs/checkouts/re │
│ -f979b009b072           │                          │ adthedocs.org/user_buil │
│                         │                          │ ds/buildtest/checkouts/ │
│                         │                          │ devel/tutorials/tags_ex │
│                         │                          │ ample.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/a836d39b-1bfe-4026-be41-e2a3c3bbd1c9 ───────────────
Executor: generic.local.bash
Description: hello world example
State: PASS
Returncode: 0
Runtime: 0.005626 sec
Starttime: 2024/04/16 17:02:38
Endtime: 2024/04/16 17:02:38
Command: bash hello_world_build.sh
Test Script: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/a836d39b/hello_world.sh
Build Script: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/a836d39b/hello_world_build.sh
Output File: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/a836d39b/hello_world.out
Error File: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello_world/a836d39b/hello_world.err
Log File: /tmp/tmpn1m7r6ej/var/logs/buildtest_0owznq_m.log
─ Output File: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hell… ─
hello world!                                                                    
                                                                                
─ Error File: /tmp/tmpn1m7r6ej/var/tests/generic.local.bash/hello_world/hello… ─
                                                                                
─ Test File: /tmp/tmpn1m7r6ej/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/devel/… ─
"[/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/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/tmpn1m7r6ej/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