Building Test via buildtest (buildtest build)

This guide will get you familiar with buildtest command line interface. Once you complete this section, you can proceed to writing buildspecs section where we will cover how to write buildspecs.

Once you install buildtest, you should find the buildtest command in your $PATH. You can check the path to buildtest command by running:

$ which buildtest

If you don’t see buildtest go back and install buildtest.

When you clone buildtest, you also get a set of buildspecs that you can run on your system. The buildtest build command is used for building and running tests. Buildtest will read one or more buildspecs file that adheres to one of the buildtest schemas. For a complete list of build options please run buildtest build --help.

Note

buildtest bd is an alias for buildtest build command.

Build Usage

$ buildtest build --help
usage: buildtest [options] [COMMANDS] build [-h] [-b BUILDSPEC] [-x EXCLUDE]
                                            [-e EXECUTOR] [-t TAGS]
                                            [-f FILTER] [--helpfilter]
                                            [--account ACCOUNT]
                                            [--disable-executor-check] [-k]
                                            [--max-pend-time MAX_PEND_TIME]
                                            [--poll-interval POLL_INTERVAL]
                                            [--rebuild REBUILD] [-r REPORT]
                                            [--retry RETRY] [-s {parse,build}]
                                            [--testdir TESTDIR]

optional arguments:
  -h, --help            show this help message and exit

discover:
  select buildspecs

  -b BUILDSPEC, --buildspec BUILDSPEC
                        Specify a buildspec (file or directory) to build. A
                        buildspec must end in '.yml' extension.
  -x EXCLUDE, --exclude EXCLUDE
                        Exclude one or more buildspecs (file or directory)
                        from processing. A buildspec must end in '.yml'
                        extension.
  -e EXECUTOR, --executor EXECUTOR
                        Discover buildspecs by executor name found in
                        buildspec cache
  -t TAGS, --tags TAGS  Discover buildspecs by tags found in buildspec cache

filter:
  Filter tests

  -f FILTER, --filter FILTER
                        Filter buildspec based on tags, type, or maintainers.
                        Usage: --filter key1=val1,key2=val2
  --helpfilter          Show available filter fields used with --filter option

extra:
  All extra options

  --account ACCOUNT     Specify project account used to charge batch jobs
                        (applicable for batch jobs only)
  --disable-executor-check
                        Disable executor check during configuration check. By
                        default these checks are enforced for Local, Slurm,
                        PBS, LSF, and Cobalt Executor.
  -k, --keep-stage-dir  Keep stage directory after job completion.
  --max-pend-time MAX_PEND_TIME
                        Specify Maximum Pending Time (sec) for job before
                        cancelling job. This only applies for batch job
                        submission.
  --poll-interval POLL_INTERVAL
                        Specify Poll Interval (sec) for polling batch jobs
  --rebuild REBUILD     Rebuild test X number of times. Must be a positive
                        number between [1-50]
  -r REPORT, --report REPORT
                        Specify a report file where tests will be written.
  --retry RETRY         Retry failed jobs
  -s {parse,build}, --stage {parse,build}
                        control behavior of buildtest build
  --testdir TESTDIR     Specify a custom test directory where to write tests.
                        This overrides configuration file and default
                        location.

Building a Test

To build a test, we use the --buildspec or short option -b to specify the path to buildspec file. Let’s see some examples, first we specify a full path to buildspec file. In this example, buildtest will discover buildspecs followed by parsing the test with appropriate schema and generate a shell script that is run by buildtest. You can learn more about build and test process.

$ buildtest build -b $BUILDTEST_ROOT/tutorials/vars.yml
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:40:45                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -b /home/docs/checkouts/readthedocs │
│ .org/user_builds/buildtest/checkouts/v0.12.0/tutorials/vars.yml              │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  1
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 1
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/vars.yml: VALID
Total builder objects created: 1


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ variables_bash/10 │ generic.local.bas │ Declare shell    │ /home/docs/checko │
│ d05f12            │ h                 │ variables in     │ uts/readthedocs.o │
│                   │                   │ bash             │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/vars.yml        │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
variables_bash/10d05f12: Creating test directory: /home/docs/checkouts/readthedo
cs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/vars
/variables_bash/10d05f12
variables_bash/10d05f12: Creating the stage directory: /home/docs/checkouts/read
thedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash
/vars/variables_bash/10d05f12/stage
variables_bash/10d05f12: Writing build script: /home/docs/checkouts/readthedocs.
org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/vars/va
riables_bash/10d05f12/variables_bash_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
______________________________
Launching test: variables_bash/10d05f12
variables_bash/10d05f12: Running Test via command: bash --norc --noprofile -eo 
pipefail variables_bash_build.sh
variables_bash/10d05f12: Test completed with returncode: 0
variables_bash/10d05f12: Test completed in 0.013733 seconds
variables_bash/10d05f12: Writing output file -  /home/docs/checkouts/readthedocs
.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/vars/v
ariables_bash/10d05f12/variables_bash.out
variables_bash/10d05f12: Writing error file - /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/vars/var
iables_bash/10d05f12/variables_bash.err
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Builder      ┃ executor     ┃ status ┃ Checks        ┃ ReturnCode ┃ Runtime  ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃              ┃              ┃        ┃ Runtime)      ┃            ┃          ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ variables_ba │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.013733 │
│ sh/10d05f12  │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



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


Adding 1 test results to /home/docs/checkouts/readthedocs.org/user_builds/buildt
est/checkouts/v0.12.0/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/logs/buildtest_w_fhuvys.log

Note

buildtest will only read buildspecs with .yml extension, if you specify a .yaml it will be ignored by buildtest.

The --buildspec option can be used to specify a file or directory path. If you want to build multiple buildspecs in a directory you can specify the directory path and buildtest will recursively search for all .yml files. In the next example, we build all tests in directory general_tests/configuration.

$ buildtest build -b general_tests/configuration/
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:04                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -b general_tests/configuration/     │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  4
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  4
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 4
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/gen
eral_tests/configuration/systemd-default-target.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/gen
eral_tests/configuration/kernel_state.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/gen
eral_tests/configuration/disk_usage.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/gen
eral_tests/configuration/ulimits.yml: VALID
Total builder objects created: 9


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ systemd_default_t │ generic.local.bas │ check if default │ /home/docs/checko │
│ arget/8fbaa780    │ h                 │ target is multi- │ uts/readthedocs.o │
│                   │                   │ user.target      │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/systemd-defaul │
│                   │                   │                  │ t-target.yml      │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ kernel_swapusage/ │ generic.local.bas │ Retrieve Kernel  │ /home/docs/checko │
│ 130cfeae          │ h                 │ Swap Usage       │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/kernel_state.y │
│                   │                   │                  │ ml                │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ root_disk_usage/2 │ generic.local.bas │ Check root disk  │ /home/docs/checko │
│ 30a8f4b           │ h                 │ usage and report │ uts/readthedocs.o │
│                   │                   │ if it exceeds    │ rg/user_builds/bu │
│                   │                   │ threshold        │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/disk_usage.yml │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_filelock_u │ generic.local.bas │ Check if file    │ /home/docs/checko │
│ nlimited/06214bd5 │ h                 │ lock is set to   │ uts/readthedocs.o │
│                   │                   │ unlimited in     │ rg/user_builds/bu │
│                   │                   │ ulimits          │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_cputime_un │ generic.local.bas │ Check if cputime │ /home/docs/checko │
│ limited/3d996aa6  │ h                 │ is set to        │ uts/readthedocs.o │
│                   │                   │ unlimited in     │ rg/user_builds/bu │
│                   │                   │ ulimits          │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_stacksize_ │ generic.local.bas │ Check if stack   │ /home/docs/checko │
│ unlimited/22be323 │ h                 │ size is set to   │ uts/readthedocs.o │
│ 2                 │                   │ unlimited in     │ rg/user_builds/bu │
│                   │                   │ ulimits          │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_vmsize_unl │ generic.local.bas │ Check virtual    │ /home/docs/checko │
│ imited/3203f44b   │ h                 │ memory size and  │ uts/readthedocs.o │
│                   │                   │ check if its set │ rg/user_builds/bu │
│                   │                   │ to unlimited     │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_filedescri │ generic.local.bas │ Check if open    │ /home/docs/checko │
│ ptor_4096/493671d │ h                 │ file descriptors │ uts/readthedocs.o │
│ 0                 │                   │ limit is set to  │ rg/user_builds/bu │
│                   │                   │ 4096             │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_max_user_p │ generic.local.bas │ Check max number │ /home/docs/checko │
│ rocess_2048/33d26 │ h                 │ of user process  │ uts/readthedocs.o │
│ dc2               │                   │ limit is set to  │ rg/user_builds/bu │
│                   │                   │ 2048             │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
systemd_default_target/8fbaa780: Creating test directory: /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/systemd-default-target/systemd_default_target/8fbaa780
systemd_default_target/8fbaa780: Creating the stage directory: /home/docs/checko
uts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.lo
cal.bash/systemd-default-target/systemd_default_target/8fbaa780/stage
systemd_default_target/8fbaa780: Writing build script: /home/docs/checkouts/read
thedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash
/systemd-default-target/systemd_default_target/8fbaa780/systemd_default_target_b
uild.sh
kernel_swapusage/130cfeae: Creating test directory: /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/ke
rnel_state/kernel_swapusage/130cfeae
kernel_swapusage/130cfeae: Creating the stage directory: /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/kernel_state/kernel_swapusage/130cfeae/stage
kernel_swapusage/130cfeae: Writing build script: /home/docs/checkouts/readthedoc
s.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/kerne
l_state/kernel_swapusage/130cfeae/kernel_swapusage_build.sh
root_disk_usage/230a8f4b: Creating test directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/dis
k_usage/root_disk_usage/230a8f4b
root_disk_usage/230a8f4b: Creating the stage directory: /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/disk_usage/root_disk_usage/230a8f4b/stage
root_disk_usage/230a8f4b: Writing build script: /home/docs/checkouts/readthedocs
.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/disk_u
sage/root_disk_usage/230a8f4b/root_disk_usage_build.sh
ulimit_filelock_unlimited/06214bd5: Creating test directory: /home/docs/checkout
s/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loca
l.bash/ulimits/ulimit_filelock_unlimited/06214bd5
ulimit_filelock_unlimited/06214bd5: Creating the stage directory: /home/docs/che
ckouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic
.local.bash/ulimits/ulimit_filelock_unlimited/06214bd5/stage
ulimit_filelock_unlimited/06214bd5: Writing build script: /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/ulimits/ulimit_filelock_unlimited/06214bd5/ulimit_filelock_unlimited_build.s
h
ulimit_cputime_unlimited/3d996aa6: Creating test directory: /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/ulimits/ulimit_cputime_unlimited/3d996aa6
ulimit_cputime_unlimited/3d996aa6: Creating the stage directory: /home/docs/chec
kouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.
local.bash/ulimits/ulimit_cputime_unlimited/3d996aa6/stage
ulimit_cputime_unlimited/3d996aa6: Writing build script: /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/ulimits/ulimit_cputime_unlimited/3d996aa6/ulimit_cputime_unlimited_build.sh
ulimit_stacksize_unlimited/22be3232: Creating test directory: /home/docs/checkou
ts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loc
al.bash/ulimits/ulimit_stacksize_unlimited/22be3232
ulimit_stacksize_unlimited/22be3232: Creating the stage directory: /home/docs/ch
eckouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generi
c.local.bash/ulimits/ulimit_stacksize_unlimited/22be3232/stage
ulimit_stacksize_unlimited/22be3232: Writing build script: /home/docs/checkouts/
readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.
bash/ulimits/ulimit_stacksize_unlimited/22be3232/ulimit_stacksize_unlimited_buil
d.sh
ulimit_vmsize_unlimited/3203f44b: Creating test directory: /home/docs/checkouts/
readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.
bash/ulimits/ulimit_vmsize_unlimited/3203f44b
ulimit_vmsize_unlimited/3203f44b: Creating the stage directory: /home/docs/check
outs/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.l
ocal.bash/ulimits/ulimit_vmsize_unlimited/3203f44b/stage
ulimit_vmsize_unlimited/3203f44b: Writing build script: /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/ulimits/ulimit_vmsize_unlimited/3203f44b/ulimit_vmsize_unlimited_build.sh
ulimit_filedescriptor_4096/493671d0: Creating test directory: /home/docs/checkou
ts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loc
al.bash/ulimits/ulimit_filedescriptor_4096/493671d0
ulimit_filedescriptor_4096/493671d0: Creating the stage directory: /home/docs/ch
eckouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generi
c.local.bash/ulimits/ulimit_filedescriptor_4096/493671d0/stage
ulimit_filedescriptor_4096/493671d0: Writing build script: /home/docs/checkouts/
readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.
bash/ulimits/ulimit_filedescriptor_4096/493671d0/ulimit_filedescriptor_4096_buil
d.sh
ulimit_max_user_process_2048/33d26dc2: Creating test directory: /home/docs/check
outs/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.l
ocal.bash/ulimits/ulimit_max_user_process_2048/33d26dc2
ulimit_max_user_process_2048/33d26dc2: Creating the stage directory: /home/docs/
checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/gene
ric.local.bash/ulimits/ulimit_max_user_process_2048/33d26dc2/stage
ulimit_max_user_process_2048/33d26dc2: Writing build script: /home/docs/checkout
s/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loca
l.bash/ulimits/ulimit_max_user_process_2048/33d26dc2/ulimit_max_user_process_204
8_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
______________________________
Launching test: systemd_default_target/8fbaa780
______________________________
Launching test: kernel_swapusage/130cfeae
______________________________
Launching test: root_disk_usage/230a8f4b
______________________________
Launching test: ulimit_filelock_unlimited/06214bd5
______________________________
Launching test: ulimit_cputime_unlimited/3d996aa6
______________________________
Launching test: ulimit_stacksize_unlimited/22be3232
______________________________
Launching test: ulimit_vmsize_unlimited/3203f44b
______________________________
Launching test: ulimit_filedescriptor_4096/493671d0
systemd_default_target/8fbaa780: Running Test via command: bash --norc 
--noprofile -eo pipefail systemd_default_target_build.sh
______________________________
Launching test: ulimit_max_user_process_2048/33d26dc2
kernel_swapusage/130cfeae: Running Test via command: bash --norc --noprofile -eo
pipefail kernel_swapusage_build.sh
kernel_swapusage/130cfeae: Test completed with returncode: 255
kernel_swapusage/130cfeae: Test completed in 0.058462 seconds
kernel_swapusage/130cfeae: Writing output file -  /home/docs/checkouts/readthedo
cs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/kern
el_state/kernel_swapusage/130cfeae/kernel_swapusage.out
kernel_swapusage/130cfeae: Writing error file - /home/docs/checkouts/readthedocs
.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/kernel
_state/kernel_swapusage/130cfeae/kernel_swapusage.err
root_disk_usage/230a8f4b: Running Test via command: bash --norc --noprofile -eo 
pipefail root_disk_usage_build.sh
root_disk_usage/230a8f4b: Test completed with returncode: 0
root_disk_usage/230a8f4b: Test completed in 0.042672 seconds
root_disk_usage/230a8f4b: Writing output file -  /home/docs/checkouts/readthedoc
s.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/disk_
usage/root_disk_usage/230a8f4b/root_disk_usage.out
root_disk_usage/230a8f4b: Writing error file - /home/docs/checkouts/readthedocs.
org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/disk_us
age/root_disk_usage/230a8f4b/root_disk_usage.err
ulimit_filelock_unlimited/06214bd5: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_filelock_unlimited_build.sh
ulimit_filelock_unlimited/06214bd5: Test completed with returncode: 0
ulimit_filelock_unlimited/06214bd5: Test completed in 0.024806 seconds
ulimit_filelock_unlimited/06214bd5: Writing output file -  /home/docs/checkouts/
readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.
bash/ulimits/ulimit_filelock_unlimited/06214bd5/ulimit_filelock_unlimited.out
ulimit_filelock_unlimited/06214bd5: Writing error file - /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/ulimits/ulimit_filelock_unlimited/06214bd5/ulimit_filelock_unlimited.err
ulimit_filelock_unlimited/06214bd5: performing regular expression - 
'^unlimited$' on file: /home/docs/checkouts/readthedocs.org/user_builds/buildtes
t/checkouts/v0.12.0/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimit
ed/06214bd5/ulimit_filelock_unlimited.out
ulimit_filelock_unlimited/06214bd5: Regular Expression Match - Success!
ulimit_cputime_unlimited/3d996aa6: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_cputime_unlimited_build.sh
ulimit_cputime_unlimited/3d996aa6: Test completed with returncode: 0
ulimit_cputime_unlimited/3d996aa6: Test completed in 0.027083 seconds
ulimit_cputime_unlimited/3d996aa6: Writing output file -  /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/ulimits/ulimit_cputime_unlimited/3d996aa6/ulimit_cputime_unlimited.out
ulimit_cputime_unlimited/3d996aa6: Writing error file - /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/ulimits/ulimit_cputime_unlimited/3d996aa6/ulimit_cputime_unlimited.err
ulimit_cputime_unlimited/3d996aa6: performing regular expression - '^unlimited$'
on file: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0
.12.0/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/3d996aa6/uli
mit_cputime_unlimited.out
ulimit_cputime_unlimited/3d996aa6: Regular Expression Match - Success!
ulimit_stacksize_unlimited/22be3232: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_stacksize_unlimited_build.sh
systemd_default_target/8fbaa780: Test completed with returncode: 1
ulimit_stacksize_unlimited/22be3232: Test completed with returncode: 0
systemd_default_target/8fbaa780: Test completed in 0.239271 seconds
ulimit_stacksize_unlimited/22be3232: Test completed in 0.02742 seconds
ulimit_stacksize_unlimited/22be3232: Writing output file -  /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/ulimits/ulimit_stacksize_unlimited/22be3232/ulimit_stacksize_unlimited.out
systemd_default_target/8fbaa780: Writing output file -  /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/systemd-default-target/systemd_default_target/8fbaa780/systemd_default_target.
out
ulimit_stacksize_unlimited/22be3232: Writing error file - /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/ulimits/ulimit_stacksize_unlimited/22be3232/ulimit_stacksize_unlimited.err
systemd_default_target/8fbaa780: Writing error file - /home/docs/checkouts/readt
hedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/
systemd-default-target/systemd_default_target/8fbaa780/systemd_default_target.er
r
ulimit_stacksize_unlimited/22be3232: performing regular expression - 
'^unlimited$' on file: /home/docs/checkouts/readthedocs.org/user_builds/buildtes
t/checkouts/v0.12.0/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimi
ted/22be3232/ulimit_stacksize_unlimited.out
ulimit_stacksize_unlimited/22be3232: Regular Expression Match - Failed!
ulimit_vmsize_unlimited/3203f44b: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_vmsize_unlimited_build.sh
ulimit_filedescriptor_4096/493671d0: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_filedescriptor_4096_build.sh
ulimit_vmsize_unlimited/3203f44b: Test completed with returncode: 0
ulimit_vmsize_unlimited/3203f44b: Test completed in 0.01199 seconds
ulimit_vmsize_unlimited/3203f44b: Writing output file -  /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/ulimits/ulimit_vmsize_unlimited/3203f44b/ulimit_vmsize_unlimited.out
ulimit_vmsize_unlimited/3203f44b: Writing error file - /home/docs/checkouts/read
thedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash
/ulimits/ulimit_vmsize_unlimited/3203f44b/ulimit_vmsize_unlimited.err
ulimit_vmsize_unlimited/3203f44b: performing regular expression - '^unlimited$' 
on file: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0
.12.0/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/3203f44b/ulim
it_vmsize_unlimited.out
ulimit_vmsize_unlimited/3203f44b: Regular Expression Match - Success!
ulimit_max_user_process_2048/33d26dc2: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_max_user_process_2048_build.sh
ulimit_filedescriptor_4096/493671d0: Test completed with returncode: 0
ulimit_filedescriptor_4096/493671d0: Test completed in 0.027614 seconds
ulimit_filedescriptor_4096/493671d0: Writing output file -  /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/ulimits/ulimit_filedescriptor_4096/493671d0/ulimit_filedescriptor_4096.out
ulimit_max_user_process_2048/33d26dc2: Test completed with returncode: 0
ulimit_max_user_process_2048/33d26dc2: Test completed in 0.009475 seconds
ulimit_filedescriptor_4096/493671d0: Writing error file - /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/ulimits/ulimit_filedescriptor_4096/493671d0/ulimit_filedescriptor_4096.err
ulimit_filedescriptor_4096/493671d0: performing regular expression - '^4096$' on
file: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12
.0/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/493671d0/ulim
it_filedescriptor_4096.out
ulimit_filedescriptor_4096/493671d0: Regular Expression Match - Failed!
ulimit_max_user_process_2048/33d26dc2: Writing output file -  /home/docs/checkou
ts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loc
al.bash/ulimits/ulimit_max_user_process_2048/33d26dc2/ulimit_max_user_process_20
48.out
ulimit_max_user_process_2048/33d26dc2: Writing error file - /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/ulimits/ulimit_max_user_process_2048/33d26dc2/ulimit_max_user_process_2048
.err
ulimit_max_user_process_2048/33d26dc2: performing regular expression - '^2048$' 
on file: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0
.12.0/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/33d26dc2
/ulimit_max_user_process_2048.out
ulimit_max_user_process_2048/33d26dc2: Regular Expression Match - Failed!
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Builder      ┃ executor     ┃ status ┃ Checks        ┃ ReturnCode ┃ Runtime  ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃              ┃              ┃        ┃ Runtime)      ┃            ┃          ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ kernel_swapu │ generic.loc… │ FAIL   │ N/A N/A N/A   │ 255        │ 0.058462 │
│ sage/130cfea │              │        │               │            │          │
│ e            │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ root_disk_us │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.042672 │
│ age/230a8f4b │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_filel │ generic.loc… │ PASS   │ False True    │ 0          │ 0.024806 │
│ ock_unlimite │              │        │ False         │            │          │
│ d/06214bd5   │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_cputi │ generic.loc… │ PASS   │ False True    │ 0          │ 0.027083 │
│ me_unlimited │              │        │ False         │            │          │
│ /3d996aa6    │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_stack │ generic.loc… │ FAIL   │ False False   │ 0          │ 0.02742  │
│ size_unlimit │              │        │ False         │            │          │
│ ed/22be3232  │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_vmsiz │ generic.loc… │ PASS   │ False True    │ 0          │ 0.01199  │
│ e_unlimited/ │              │        │ False         │            │          │
│ 3203f44b     │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_filed │ generic.loc… │ FAIL   │ False False   │ 0          │ 0.027614 │
│ escriptor_40 │              │        │ False         │            │          │
│ 96/493671d0  │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_max_u │ generic.loc… │ FAIL   │ False False   │ 0          │ 0.009475 │
│ ser_process_ │              │        │ False         │            │          │
│ 2048/33d26dc │              │        │               │            │          │
│ 2            │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ systemd_defa │ generic.loc… │ FAIL   │ N/A N/A N/A   │ 1          │ 0.239271 │
│ ult_target/8 │              │        │               │            │          │
│ fbaa780      │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



Passed Tests: 4/9 Percentage: 44.444%
Failed Tests: 5/9 Percentage: 55.556%


Adding 9 test results to /home/docs/checkouts/readthedocs.org/user_builds/buildt
est/checkouts/v0.12.0/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/logs/buildtest_tv3usdh4.log

Building Multiple Buildspecs

You can append -b option to build multiple buildspecs in the same command. Buildtest will discover buildspecs for every argument (-b) and accumulate a list of buildspecs to run. In this example, we instruct buildtest to build a buildspec file and all buildspecs in a directory path.

$ buildtest build -b general_tests/configuration/ -b tutorials/vars.yml
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:05                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -b general_tests/configuration/ -b  │
│ tutorials/vars.yml                                                           │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  5
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  5
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 5
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/gen
eral_tests/configuration/disk_usage.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/gen
eral_tests/configuration/ulimits.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/gen
eral_tests/configuration/systemd-default-target.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/gen
eral_tests/configuration/kernel_state.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/vars.yml: VALID
Total builder objects created: 10


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ root_disk_usage/d │ generic.local.bas │ Check root disk  │ /home/docs/checko │
│ a79565a           │ h                 │ usage and report │ uts/readthedocs.o │
│                   │                   │ if it exceeds    │ rg/user_builds/bu │
│                   │                   │ threshold        │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/disk_usage.yml │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_filelock_u │ generic.local.bas │ Check if file    │ /home/docs/checko │
│ nlimited/f1864cca │ h                 │ lock is set to   │ uts/readthedocs.o │
│                   │                   │ unlimited in     │ rg/user_builds/bu │
│                   │                   │ ulimits          │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_cputime_un │ generic.local.bas │ Check if cputime │ /home/docs/checko │
│ limited/bbd284d4  │ h                 │ is set to        │ uts/readthedocs.o │
│                   │                   │ unlimited in     │ rg/user_builds/bu │
│                   │                   │ ulimits          │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_stacksize_ │ generic.local.bas │ Check if stack   │ /home/docs/checko │
│ unlimited/27240fc │ h                 │ size is set to   │ uts/readthedocs.o │
│ 7                 │                   │ unlimited in     │ rg/user_builds/bu │
│                   │                   │ ulimits          │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_vmsize_unl │ generic.local.bas │ Check virtual    │ /home/docs/checko │
│ imited/2e04dda0   │ h                 │ memory size and  │ uts/readthedocs.o │
│                   │                   │ check if its set │ rg/user_builds/bu │
│                   │                   │ to unlimited     │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_filedescri │ generic.local.bas │ Check if open    │ /home/docs/checko │
│ ptor_4096/6c1d456 │ h                 │ file descriptors │ uts/readthedocs.o │
│ b                 │                   │ limit is set to  │ rg/user_builds/bu │
│                   │                   │ 4096             │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ ulimit_max_user_p │ generic.local.bas │ Check max number │ /home/docs/checko │
│ rocess_2048/9c949 │ h                 │ of user process  │ uts/readthedocs.o │
│ 4c7               │                   │ limit is set to  │ rg/user_builds/bu │
│                   │                   │ 2048             │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/ulimits.yml    │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ systemd_default_t │ generic.local.bas │ check if default │ /home/docs/checko │
│ arget/4275876c    │ h                 │ target is multi- │ uts/readthedocs.o │
│                   │                   │ user.target      │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/systemd-defaul │
│                   │                   │                  │ t-target.yml      │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ kernel_swapusage/ │ generic.local.bas │ Retrieve Kernel  │ /home/docs/checko │
│ 3a714dcf          │ h                 │ Swap Usage       │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/kernel_state.y │
│                   │                   │                  │ ml                │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ variables_bash/b8 │ generic.local.bas │ Declare shell    │ /home/docs/checko │
│ 1d1e83            │ h                 │ variables in     │ uts/readthedocs.o │
│                   │                   │ bash             │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/vars.yml        │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
root_disk_usage/da79565a: Creating test directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/dis
k_usage/root_disk_usage/da79565a
root_disk_usage/da79565a: Creating the stage directory: /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/disk_usage/root_disk_usage/da79565a/stage
root_disk_usage/da79565a: Writing build script: /home/docs/checkouts/readthedocs
.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/disk_u
sage/root_disk_usage/da79565a/root_disk_usage_build.sh
ulimit_filelock_unlimited/f1864cca: Creating test directory: /home/docs/checkout
s/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loca
l.bash/ulimits/ulimit_filelock_unlimited/f1864cca
ulimit_filelock_unlimited/f1864cca: Creating the stage directory: /home/docs/che
ckouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic
.local.bash/ulimits/ulimit_filelock_unlimited/f1864cca/stage
ulimit_filelock_unlimited/f1864cca: Writing build script: /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/ulimits/ulimit_filelock_unlimited/f1864cca/ulimit_filelock_unlimited_build.s
h
ulimit_cputime_unlimited/bbd284d4: Creating test directory: /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/ulimits/ulimit_cputime_unlimited/bbd284d4
ulimit_cputime_unlimited/bbd284d4: Creating the stage directory: /home/docs/chec
kouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.
local.bash/ulimits/ulimit_cputime_unlimited/bbd284d4/stage
ulimit_cputime_unlimited/bbd284d4: Writing build script: /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/ulimits/ulimit_cputime_unlimited/bbd284d4/ulimit_cputime_unlimited_build.sh
ulimit_stacksize_unlimited/27240fc7: Creating test directory: /home/docs/checkou
ts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loc
al.bash/ulimits/ulimit_stacksize_unlimited/27240fc7
ulimit_stacksize_unlimited/27240fc7: Creating the stage directory: /home/docs/ch
eckouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generi
c.local.bash/ulimits/ulimit_stacksize_unlimited/27240fc7/stage
ulimit_stacksize_unlimited/27240fc7: Writing build script: /home/docs/checkouts/
readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.
bash/ulimits/ulimit_stacksize_unlimited/27240fc7/ulimit_stacksize_unlimited_buil
d.sh
ulimit_vmsize_unlimited/2e04dda0: Creating test directory: /home/docs/checkouts/
readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.
bash/ulimits/ulimit_vmsize_unlimited/2e04dda0
ulimit_vmsize_unlimited/2e04dda0: Creating the stage directory: /home/docs/check
outs/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.l
ocal.bash/ulimits/ulimit_vmsize_unlimited/2e04dda0/stage
ulimit_vmsize_unlimited/2e04dda0: Writing build script: /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/ulimits/ulimit_vmsize_unlimited/2e04dda0/ulimit_vmsize_unlimited_build.sh
ulimit_filedescriptor_4096/6c1d456b: Creating test directory: /home/docs/checkou
ts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loc
al.bash/ulimits/ulimit_filedescriptor_4096/6c1d456b
ulimit_filedescriptor_4096/6c1d456b: Creating the stage directory: /home/docs/ch
eckouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generi
c.local.bash/ulimits/ulimit_filedescriptor_4096/6c1d456b/stage
ulimit_filedescriptor_4096/6c1d456b: Writing build script: /home/docs/checkouts/
readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.
bash/ulimits/ulimit_filedescriptor_4096/6c1d456b/ulimit_filedescriptor_4096_buil
d.sh
ulimit_max_user_process_2048/9c9494c7: Creating test directory: /home/docs/check
outs/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.l
ocal.bash/ulimits/ulimit_max_user_process_2048/9c9494c7
ulimit_max_user_process_2048/9c9494c7: Creating the stage directory: /home/docs/
checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/gene
ric.local.bash/ulimits/ulimit_max_user_process_2048/9c9494c7/stage
ulimit_max_user_process_2048/9c9494c7: Writing build script: /home/docs/checkout
s/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loca
l.bash/ulimits/ulimit_max_user_process_2048/9c9494c7/ulimit_max_user_process_204
8_build.sh
systemd_default_target/4275876c: Creating test directory: /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/systemd-default-target/systemd_default_target/4275876c
systemd_default_target/4275876c: Creating the stage directory: /home/docs/checko
uts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.lo
cal.bash/systemd-default-target/systemd_default_target/4275876c/stage
systemd_default_target/4275876c: Writing build script: /home/docs/checkouts/read
thedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash
/systemd-default-target/systemd_default_target/4275876c/systemd_default_target_b
uild.sh
kernel_swapusage/3a714dcf: Creating test directory: /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/ke
rnel_state/kernel_swapusage/3a714dcf
kernel_swapusage/3a714dcf: Creating the stage directory: /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/kernel_state/kernel_swapusage/3a714dcf/stage
kernel_swapusage/3a714dcf: Writing build script: /home/docs/checkouts/readthedoc
s.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/kerne
l_state/kernel_swapusage/3a714dcf/kernel_swapusage_build.sh
variables_bash/b81d1e83: Creating test directory: /home/docs/checkouts/readthedo
cs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/vars
/variables_bash/b81d1e83
variables_bash/b81d1e83: Creating the stage directory: /home/docs/checkouts/read
thedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash
/vars/variables_bash/b81d1e83/stage
variables_bash/b81d1e83: Writing build script: /home/docs/checkouts/readthedocs.
org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/vars/va
riables_bash/b81d1e83/variables_bash_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
______________________________
Launching test: root_disk_usage/da79565a
______________________________
Launching test: ulimit_filelock_unlimited/f1864cca
______________________________
Launching test: ulimit_cputime_unlimited/bbd284d4
______________________________
Launching test: ulimit_stacksize_unlimited/27240fc7
______________________________
Launching test: ulimit_vmsize_unlimited/2e04dda0
______________________________
Launching test: ulimit_filedescriptor_4096/6c1d456b
______________________________
Launching test: ulimit_max_user_process_2048/9c9494c7
root_disk_usage/da79565a: Running Test via command: bash --norc --noprofile -eo 
pipefail root_disk_usage_build.sh
______________________________
Launching test: systemd_default_target/4275876c
______________________________
Launching test: kernel_swapusage/3a714dcf
______________________________
Launching test: variables_bash/b81d1e83
ulimit_filelock_unlimited/f1864cca: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_filelock_unlimited_build.sh
ulimit_filelock_unlimited/f1864cca: Test completed with returncode: 0
ulimit_filelock_unlimited/f1864cca: Test completed in 0.017274 seconds
ulimit_filelock_unlimited/f1864cca: Writing output file -  /home/docs/checkouts/
readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.
bash/ulimits/ulimit_filelock_unlimited/f1864cca/ulimit_filelock_unlimited.out
ulimit_filelock_unlimited/f1864cca: Writing error file - /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/ulimits/ulimit_filelock_unlimited/f1864cca/ulimit_filelock_unlimited.err
ulimit_filelock_unlimited/f1864cca: performing regular expression - 
'^unlimited$' on file: /home/docs/checkouts/readthedocs.org/user_builds/buildtes
t/checkouts/v0.12.0/var/tests/generic.local.bash/ulimits/ulimit_filelock_unlimit
ed/f1864cca/ulimit_filelock_unlimited.out
ulimit_filelock_unlimited/f1864cca: Regular Expression Match - Success!
ulimit_cputime_unlimited/bbd284d4: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_cputime_unlimited_build.sh
ulimit_cputime_unlimited/bbd284d4: Test completed with returncode: 0
root_disk_usage/da79565a: Test completed with returncode: 0
ulimit_cputime_unlimited/bbd284d4: Test completed in 0.017909 seconds
root_disk_usage/da79565a: Test completed in 0.056141 seconds
ulimit_cputime_unlimited/bbd284d4: Writing output file -  /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/ulimits/ulimit_cputime_unlimited/bbd284d4/ulimit_cputime_unlimited.out
root_disk_usage/da79565a: Writing output file -  /home/docs/checkouts/readthedoc
s.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/disk_
usage/root_disk_usage/da79565a/root_disk_usage.out
ulimit_cputime_unlimited/bbd284d4: Writing error file - /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/ulimits/ulimit_cputime_unlimited/bbd284d4/ulimit_cputime_unlimited.err
root_disk_usage/da79565a: Writing error file - /home/docs/checkouts/readthedocs.
org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/disk_us
age/root_disk_usage/da79565a/root_disk_usage.err
ulimit_cputime_unlimited/bbd284d4: performing regular expression - '^unlimited$'
on file: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0
.12.0/var/tests/generic.local.bash/ulimits/ulimit_cputime_unlimited/bbd284d4/uli
mit_cputime_unlimited.out
ulimit_cputime_unlimited/bbd284d4: Regular Expression Match - Success!
ulimit_stacksize_unlimited/27240fc7: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_stacksize_unlimited_build.sh
ulimit_vmsize_unlimited/2e04dda0: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_vmsize_unlimited_build.sh
ulimit_stacksize_unlimited/27240fc7: Test completed with returncode: 0
ulimit_stacksize_unlimited/27240fc7: Test completed in 0.02573 seconds
ulimit_vmsize_unlimited/2e04dda0: Test completed with returncode: 0
ulimit_vmsize_unlimited/2e04dda0: Test completed in 0.025774 seconds
ulimit_stacksize_unlimited/27240fc7: Writing output file -  /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/ulimits/ulimit_stacksize_unlimited/27240fc7/ulimit_stacksize_unlimited.out
ulimit_vmsize_unlimited/2e04dda0: Writing output file -  /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/ulimits/ulimit_vmsize_unlimited/2e04dda0/ulimit_vmsize_unlimited.out
ulimit_stacksize_unlimited/27240fc7: Writing error file - /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/ulimits/ulimit_stacksize_unlimited/27240fc7/ulimit_stacksize_unlimited.err
ulimit_vmsize_unlimited/2e04dda0: Writing error file - /home/docs/checkouts/read
thedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash
/ulimits/ulimit_vmsize_unlimited/2e04dda0/ulimit_vmsize_unlimited.err
ulimit_stacksize_unlimited/27240fc7: performing regular expression - 
'^unlimited$' on file: /home/docs/checkouts/readthedocs.org/user_builds/buildtes
t/checkouts/v0.12.0/var/tests/generic.local.bash/ulimits/ulimit_stacksize_unlimi
ted/27240fc7/ulimit_stacksize_unlimited.out
ulimit_vmsize_unlimited/2e04dda0: performing regular expression - '^unlimited$' 
on file: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0
.12.0/var/tests/generic.local.bash/ulimits/ulimit_vmsize_unlimited/2e04dda0/ulim
it_vmsize_unlimited.out
ulimit_vmsize_unlimited/2e04dda0: Regular Expression Match - Success!
ulimit_stacksize_unlimited/27240fc7: Regular Expression Match - Failed!
ulimit_filedescriptor_4096/6c1d456b: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_filedescriptor_4096_build.sh
ulimit_max_user_process_2048/9c9494c7: Running Test via command: bash --norc 
--noprofile -eo pipefail ulimit_max_user_process_2048_build.sh
ulimit_filedescriptor_4096/6c1d456b: Test completed with returncode: 0
ulimit_max_user_process_2048/9c9494c7: Test completed with returncode: 0
ulimit_filedescriptor_4096/6c1d456b: Test completed in 0.035782 seconds
ulimit_max_user_process_2048/9c9494c7: Test completed in 0.028212 seconds
ulimit_filedescriptor_4096/6c1d456b: Writing output file -  /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/ulimits/ulimit_filedescriptor_4096/6c1d456b/ulimit_filedescriptor_4096.out
ulimit_max_user_process_2048/9c9494c7: Writing output file -  /home/docs/checkou
ts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loc
al.bash/ulimits/ulimit_max_user_process_2048/9c9494c7/ulimit_max_user_process_20
48.out
ulimit_filedescriptor_4096/6c1d456b: Writing error file - /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/ulimits/ulimit_filedescriptor_4096/6c1d456b/ulimit_filedescriptor_4096.err
ulimit_max_user_process_2048/9c9494c7: Writing error file - /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/ulimits/ulimit_max_user_process_2048/9c9494c7/ulimit_max_user_process_2048
.err
ulimit_filedescriptor_4096/6c1d456b: performing regular expression - '^4096$' on
file: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12
.0/var/tests/generic.local.bash/ulimits/ulimit_filedescriptor_4096/6c1d456b/ulim
it_filedescriptor_4096.out
ulimit_filedescriptor_4096/6c1d456b: Regular Expression Match - Failed!
ulimit_max_user_process_2048/9c9494c7: performing regular expression - '^2048$' 
on file: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0
.12.0/var/tests/generic.local.bash/ulimits/ulimit_max_user_process_2048/9c9494c7
/ulimit_max_user_process_2048.out
ulimit_max_user_process_2048/9c9494c7: Regular Expression Match - Failed!
systemd_default_target/4275876c: Running Test via command: bash --norc 
--noprofile -eo pipefail systemd_default_target_build.sh
kernel_swapusage/3a714dcf: Running Test via command: bash --norc --noprofile -eo
pipefail kernel_swapusage_build.sh
kernel_swapusage/3a714dcf: Test completed with returncode: 255
systemd_default_target/4275876c: Test completed with returncode: 1
kernel_swapusage/3a714dcf: Test completed in 0.034398 seconds
systemd_default_target/4275876c: Test completed in 0.038442 seconds
kernel_swapusage/3a714dcf: Writing output file -  /home/docs/checkouts/readthedo
cs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/kern
el_state/kernel_swapusage/3a714dcf/kernel_swapusage.out
kernel_swapusage/3a714dcf: Writing error file - /home/docs/checkouts/readthedocs
.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/kernel
_state/kernel_swapusage/3a714dcf/kernel_swapusage.err
systemd_default_target/4275876c: Writing output file -  /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/systemd-default-target/systemd_default_target/4275876c/systemd_default_target.
out
systemd_default_target/4275876c: Writing error file - /home/docs/checkouts/readt
hedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/
systemd-default-target/systemd_default_target/4275876c/systemd_default_target.er
r
variables_bash/b81d1e83: Running Test via command: bash --norc --noprofile -eo 
pipefail variables_bash_build.sh
variables_bash/b81d1e83: Test completed with returncode: 0
variables_bash/b81d1e83: Test completed in 0.025103 seconds
variables_bash/b81d1e83: Writing output file -  /home/docs/checkouts/readthedocs
.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/vars/v
ariables_bash/b81d1e83/variables_bash.out
variables_bash/b81d1e83: Writing error file - /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/vars/var
iables_bash/b81d1e83/variables_bash.err
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Builder      ┃ executor     ┃ status ┃ Checks        ┃ ReturnCode ┃ Runtime  ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃              ┃              ┃        ┃ Runtime)      ┃            ┃          ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ root_disk_us │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.056141 │
│ age/da79565a │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_filel │ generic.loc… │ PASS   │ False True    │ 0          │ 0.017274 │
│ ock_unlimite │              │        │ False         │            │          │
│ d/f1864cca   │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_cputi │ generic.loc… │ PASS   │ False True    │ 0          │ 0.017909 │
│ me_unlimited │              │        │ False         │            │          │
│ /bbd284d4    │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_stack │ generic.loc… │ FAIL   │ False False   │ 0          │ 0.02573  │
│ size_unlimit │              │        │ False         │            │          │
│ ed/27240fc7  │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_vmsiz │ generic.loc… │ PASS   │ False True    │ 0          │ 0.025774 │
│ e_unlimited/ │              │        │ False         │            │          │
│ 2e04dda0     │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_filed │ generic.loc… │ FAIL   │ False False   │ 0          │ 0.035782 │
│ escriptor_40 │              │        │ False         │            │          │
│ 96/6c1d456b  │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ ulimit_max_u │ generic.loc… │ FAIL   │ False False   │ 0          │ 0.028212 │
│ ser_process_ │              │        │ False         │            │          │
│ 2048/9c9494c │              │        │               │            │          │
│ 7            │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ systemd_defa │ generic.loc… │ FAIL   │ N/A N/A N/A   │ 1          │ 0.038442 │
│ ult_target/4 │              │        │               │            │          │
│ 275876c      │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ kernel_swapu │ generic.loc… │ FAIL   │ N/A N/A N/A   │ 255        │ 0.034398 │
│ sage/3a714dc │              │        │               │            │          │
│ f            │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ variables_ba │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.025103 │
│ sh/b81d1e83  │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



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


Adding 10 test results to /home/docs/checkouts/readthedocs.org/user_builds/build
test/checkouts/v0.12.0/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/logs/buildtest_jt5g1ift.log

Excluding Buildspecs

So far we learned how to build buildspecs by file and directory path using the -b option. Next, we will discuss how one may exclude buildspecs which behaves similar to -b option. You can exclude buildspecs via --exclude or short option -x which can be useful when you want to exclude certain files or sub directory.

For example we can build all buildspecs in tutorials but exclude file tutorials/vars.yml by running:

$ buildtest build -b tutorials -x tutorials/vars.yml

buildtest will discover all buildspecs and then exclude any buildspecs specified by -x option. You can specify -x multiple times just like -b option.

For example, we can undo discovery by passing same option to -b and -x as follows

$ buildtest bd -b tutorials/ -x tutorials/
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:06                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest bd -b tutorials/ -x tutorials/            │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
There are no Buildspec files to process.

Buildtest will stop immediately if there are no Buildspecs to process, this is true if you were to specify files instead of directory.

In this example, we build all buildspecs in a directory but exclude a file. Buildtest will report the excluded buildspecs in the output and -x option can be appended multiple times. The -x can be a file or a directory and behaves similar to -b option.

$ buildtest bd -b general_tests/configuration/ -x general_tests/configuration/ulimits.yml
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:07                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest bd -b general_tests/configuration/ -x     │
│ general_tests/configuration/ulimits.yml                                      │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  4
Excluded Buildspecs:  1
Detected Buildspecs after exclusion:  3
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
                              Excluded buildspecs                               
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 3
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/gen
eral_tests/configuration/kernel_state.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/gen
eral_tests/configuration/systemd-default-target.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/gen
eral_tests/configuration/disk_usage.yml: VALID
Total builder objects created: 3


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ kernel_swapusage/ │ generic.local.bas │ Retrieve Kernel  │ /home/docs/checko │
│ 82367bec          │ h                 │ Swap Usage       │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/kernel_state.y │
│                   │                   │                  │ ml                │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ systemd_default_t │ generic.local.bas │ check if default │ /home/docs/checko │
│ arget/8d5c74c4    │ h                 │ target is multi- │ uts/readthedocs.o │
│                   │                   │ user.target      │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/systemd-defaul │
│                   │                   │                  │ t-target.yml      │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ root_disk_usage/5 │ generic.local.bas │ Check root disk  │ /home/docs/checko │
│ 9eacc29           │ h                 │ usage and report │ uts/readthedocs.o │
│                   │                   │ if it exceeds    │ rg/user_builds/bu │
│                   │                   │ threshold        │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/general_ │
│                   │                   │                  │ tests/configurati │
│                   │                   │                  │ on/disk_usage.yml │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
kernel_swapusage/82367bec: Creating test directory: /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/ke
rnel_state/kernel_swapusage/82367bec
kernel_swapusage/82367bec: Creating the stage directory: /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/kernel_state/kernel_swapusage/82367bec/stage
kernel_swapusage/82367bec: Writing build script: /home/docs/checkouts/readthedoc
s.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/kerne
l_state/kernel_swapusage/82367bec/kernel_swapusage_build.sh
systemd_default_target/8d5c74c4: Creating test directory: /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/systemd-default-target/systemd_default_target/8d5c74c4
systemd_default_target/8d5c74c4: Creating the stage directory: /home/docs/checko
uts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.lo
cal.bash/systemd-default-target/systemd_default_target/8d5c74c4/stage
systemd_default_target/8d5c74c4: Writing build script: /home/docs/checkouts/read
thedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash
/systemd-default-target/systemd_default_target/8d5c74c4/systemd_default_target_b
uild.sh
root_disk_usage/59eacc29: Creating test directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/dis
k_usage/root_disk_usage/59eacc29
root_disk_usage/59eacc29: Creating the stage directory: /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/disk_usage/root_disk_usage/59eacc29/stage
root_disk_usage/59eacc29: Writing build script: /home/docs/checkouts/readthedocs
.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/disk_u
sage/root_disk_usage/59eacc29/root_disk_usage_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
______________________________
Launching test: kernel_swapusage/82367bec
______________________________
Launching test: systemd_default_target/8d5c74c4
______________________________
Launching test: root_disk_usage/59eacc29
kernel_swapusage/82367bec: Running Test via command: bash --norc --noprofile -eo
pipefail kernel_swapusage_build.sh
systemd_default_target/8d5c74c4: Running Test via command: bash --norc 
--noprofile -eo pipefail systemd_default_target_build.sh
kernel_swapusage/82367bec: Test completed with returncode: 255
kernel_swapusage/82367bec: Test completed in 0.030496 seconds
kernel_swapusage/82367bec: Writing output file -  /home/docs/checkouts/readthedo
cs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/kern
el_state/kernel_swapusage/82367bec/kernel_swapusage.out
systemd_default_target/8d5c74c4: Test completed with returncode: 1
kernel_swapusage/82367bec: Writing error file - /home/docs/checkouts/readthedocs
.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/kernel
_state/kernel_swapusage/82367bec/kernel_swapusage.err
systemd_default_target/8d5c74c4: Test completed in 0.035867 seconds
root_disk_usage/59eacc29: Running Test via command: bash --norc --noprofile -eo 
pipefail root_disk_usage_build.sh
systemd_default_target/8d5c74c4: Writing output file -  /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/systemd-default-target/systemd_default_target/8d5c74c4/systemd_default_target.
out
systemd_default_target/8d5c74c4: Writing error file - /home/docs/checkouts/readt
hedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/
systemd-default-target/systemd_default_target/8d5c74c4/systemd_default_target.er
r
root_disk_usage/59eacc29: Test completed with returncode: 0
root_disk_usage/59eacc29: Test completed in 0.013563 seconds
root_disk_usage/59eacc29: Writing output file -  /home/docs/checkouts/readthedoc
s.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/disk_
usage/root_disk_usage/59eacc29/root_disk_usage.out
root_disk_usage/59eacc29: Writing error file - /home/docs/checkouts/readthedocs.
org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/disk_us
age/root_disk_usage/59eacc29/root_disk_usage.err
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Builder      ┃ executor     ┃ status ┃ Checks        ┃ ReturnCode ┃ Runtime  ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃              ┃              ┃        ┃ Runtime)      ┃            ┃          ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ kernel_swapu │ generic.loc… │ FAIL   │ N/A N/A N/A   │ 255        │ 0.030496 │
│ sage/82367be │              │        │               │            │          │
│ c            │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ systemd_defa │ generic.loc… │ FAIL   │ N/A N/A N/A   │ 1          │ 0.035867 │
│ ult_target/8 │              │        │               │            │          │
│ d5c74c4      │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ root_disk_us │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.013563 │
│ age/59eacc29 │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



Passed Tests: 1/3 Percentage: 33.333%
Failed Tests: 2/3 Percentage: 66.667%


Adding 3 test results to /home/docs/checkouts/readthedocs.org/user_builds/buildt
est/checkouts/v0.12.0/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/logs/buildtest_cdppm0c_.log

Building By Tags

buildtest can perform builds by tags by using --tags or short option (-t). In order to use this feature, buildtest must load buildspecs in cache which can be run via buildtest buildspec find. If you are unsure of the available tags you can run buildtest buildspec find --tags or let buildtest tab-complete the available tags. For more details see Querying buildspec tags.

Let’s assume you want to build by tag name network, buildtest will attempt to find all tests that contain tags: ['network'] in the buildspec which is loaded in the buildcache cache. If a test matches the tag name, the test will be picked up during the discover process.

$ buildtest build -t network
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:07                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -t network                          │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  1
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
                           Buildspecs By Tag=network                            
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 1
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/tags_example.yml: VALID
Total builder objects created: 2


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ string_tag/244f30 │ generic.local.bas │ tags can be a    │ /home/docs/checko │
│ 85                │ h                 │ string           │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/tags_example.ym │
│                   │                   │                  │ l                 │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ list_of_strings_t │ generic.local.bas │ tags can be a    │ /home/docs/checko │
│ ags/7e0ef412      │ h                 │ list of strings  │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/tags_example.ym │
│                   │                   │                  │ l                 │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
string_tag/244f3085: Creating test directory: /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/tags_exa
mple/string_tag/244f3085
string_tag/244f3085: Creating the stage directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/tag
s_example/string_tag/244f3085/stage
string_tag/244f3085: Writing build script: /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/tags_exampl
e/string_tag/244f3085/string_tag_build.sh
list_of_strings_tags/7e0ef412: Creating test directory: /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/tags_example/list_of_strings_tags/7e0ef412
list_of_strings_tags/7e0ef412: Creating the stage directory: /home/docs/checkout
s/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loca
l.bash/tags_example/list_of_strings_tags/7e0ef412/stage
list_of_strings_tags/7e0ef412: Writing build script: /home/docs/checkouts/readth
edocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/t
ags_example/list_of_strings_tags/7e0ef412/list_of_strings_tags_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
______________________________
Launching test: string_tag/244f3085
______________________________
Launching test: list_of_strings_tags/7e0ef412
list_of_strings_tags/7e0ef412: Running Test via command: bash --norc --noprofile
-eo pipefail list_of_strings_tags_build.sh
string_tag/244f3085: Running Test via command: bash --norc --noprofile -eo 
pipefail string_tag_build.sh
string_tag/244f3085: Test completed with returncode: 0
string_tag/244f3085: Test completed in 0.029459 seconds
string_tag/244f3085: Writing output file -  /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/tags_examp
le/string_tag/244f3085/string_tag.out
string_tag/244f3085: Writing error file - /home/docs/checkouts/readthedocs.org/u
ser_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/tags_example
/string_tag/244f3085/string_tag.err
list_of_strings_tags/7e0ef412: Test completed with returncode: 0
list_of_strings_tags/7e0ef412: Test completed in 3.052032 seconds
list_of_strings_tags/7e0ef412: Writing output file -  /home/docs/checkouts/readt
hedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/
tags_example/list_of_strings_tags/7e0ef412/list_of_strings_tags.out
list_of_strings_tags/7e0ef412: Writing error file - /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/ta
gs_example/list_of_strings_tags/7e0ef412/list_of_strings_tags.err
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Builder      ┃ executor     ┃ status ┃ Checks        ┃ ReturnCode ┃ Runtime  ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃              ┃              ┃        ┃ Runtime)      ┃            ┃          ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ string_tag/2 │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.029459 │
│ 44f3085      │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ list_of_stri │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 3.052032 │
│ ngs_tags/7e0 │              │        │               │            │          │
│ ef412        │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



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


Adding 2 test results to /home/docs/checkouts/readthedocs.org/user_builds/buildt
est/checkouts/v0.12.0/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/logs/buildtest_dhtcj7i6.log

You can build by multiple tags by specifying --tags multiple times. In next example we build all tests with tag name pass and python.

$ buildtest build -t python -t pass
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:11                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -t python -t pass                   │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  3
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  3
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
                            Buildspecs By Tag=python                            
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12… ║
║  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12… ║
╚══════════════════════════════════════════════════════════════════════════════╝
                             Buildspecs By Tag=pass                             
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 3
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/python-shell.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/python-hello.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/pass_returncode.yml: VALID
Total builder objects created: 6


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ circle_area/97fe4 │ generic.local.bas │ Calculate circle │ /home/docs/checko │
│ 2b7               │ h                 │ of area given a  │ uts/readthedocs.o │
│                   │                   │ radius           │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/python-shell.ym │
│                   │                   │                  │ l                 │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ python_hello/d651 │ generic.local.bas │ Hello World      │ /home/docs/checko │
│ c676              │ h                 │ python           │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/python-hello.ym │
│                   │                   │                  │ l                 │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ exit1_fail/ad7417 │ generic.local.bas │ exit 1 by        │ /home/docs/checko │
│ 5d                │ h                 │ default is FAIL  │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ exit1_pass/be7df0 │ generic.local.bas │ report exit 1 as │ /home/docs/checko │
│ 4d                │ h                 │ PASS             │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ returncode_list_m │ generic.local.bas │ exit 2 failed    │ /home/docs/checko │
│ ismatch/d7bd3e33  │ h                 │ since it failed  │ uts/readthedocs.o │
│                   │                   │ to match         │ rg/user_builds/bu │
│                   │                   │ returncode 1     │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ returncode_int_ma │ generic.local.bas │ exit 128 matches │ /home/docs/checko │
│ tch/5673e4b8      │ h                 │ returncode 128   │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
circle_area/97fe42b7: Creating test directory: /home/docs/checkouts/readthedocs.
org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-
shell/circle_area/97fe42b7
circle_area/97fe42b7: Creating the stage directory: /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/py
thon-shell/circle_area/97fe42b7/stage
circle_area/97fe42b7: Writing build script: /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-she
ll/circle_area/97fe42b7/circle_area_build.sh
python_hello/d651c676: Creating test directory: /home/docs/checkouts/readthedocs
.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python
-hello/python_hello/d651c676
python_hello/d651c676: Creating the stage directory: /home/docs/checkouts/readth
edocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/p
ython-hello/python_hello/d651c676/stage
python_hello/d651c676: Writing build script: /home/docs/checkouts/readthedocs.or
g/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-he
llo/python_hello/d651c676/python_hello_build.sh
exit1_fail/ad74175d: Creating test directory: /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_ret
urncode/exit1_fail/ad74175d
exit1_fail/ad74175d: Creating the stage directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pas
s_returncode/exit1_fail/ad74175d/stage
exit1_fail/ad74175d: Writing build script: /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_return
code/exit1_fail/ad74175d/exit1_fail_build.sh
exit1_pass/be7df04d: Creating test directory: /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_ret
urncode/exit1_pass/be7df04d
exit1_pass/be7df04d: Creating the stage directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pas
s_returncode/exit1_pass/be7df04d/stage
exit1_pass/be7df04d: Writing build script: /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_return
code/exit1_pass/be7df04d/exit1_pass_build.sh
returncode_list_mismatch/d7bd3e33: Creating test directory: /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/pass_returncode/returncode_list_mismatch/d7bd3e33
returncode_list_mismatch/d7bd3e33: Creating the stage directory: /home/docs/chec
kouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.
local.bash/pass_returncode/returncode_list_mismatch/d7bd3e33/stage
returncode_list_mismatch/d7bd3e33: Writing build script: /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/pass_returncode/returncode_list_mismatch/d7bd3e33/returncode_list_mismatch_bu
ild.sh
returncode_int_match/5673e4b8: Creating test directory: /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/pass_returncode/returncode_int_match/5673e4b8
returncode_int_match/5673e4b8: Creating the stage directory: /home/docs/checkout
s/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loca
l.bash/pass_returncode/returncode_int_match/5673e4b8/stage
returncode_int_match/5673e4b8: Writing build script: /home/docs/checkouts/readth
edocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/p
ass_returncode/returncode_int_match/5673e4b8/returncode_int_match_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
______________________________
Launching test: circle_area/97fe42b7
______________________________
Launching test: python_hello/d651c676
______________________________
Launching test: exit1_fail/ad74175d
______________________________
Launching test: exit1_pass/be7df04d
______________________________
Launching test: returncode_list_mismatch/d7bd3e33
______________________________
Launching test: returncode_int_match/5673e4b8
circle_area/97fe42b7: Running Test via command: bash --norc --noprofile -eo 
pipefail circle_area_build.sh
python_hello/d651c676: Running Test via command: bash --norc --noprofile -eo 
pipefail python_hello_build.sh
python_hello/d651c676: Test completed with returncode: 0
python_hello/d651c676: Test completed in 0.103939 seconds
python_hello/d651c676: Writing output file -  /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-h
ello/python_hello/d651c676/python_hello.out
circle_area/97fe42b7: Test completed with returncode: 0
python_hello/d651c676: Writing error file - /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-hel
lo/python_hello/d651c676/python_hello.err
circle_area/97fe42b7: Test completed in 0.113954 seconds
circle_area/97fe42b7: Writing output file -  /home/docs/checkouts/readthedocs.or
g/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-sh
ell/circle_area/97fe42b7/circle_area.out
exit1_fail/ad74175d: Running Test via command: bash --norc --noprofile -eo 
pipefail exit1_fail_build.sh
circle_area/97fe42b7: Writing error file - /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-shel
l/circle_area/97fe42b7/circle_area.err
exit1_pass/be7df04d: Running Test via command: bash --norc --noprofile -eo 
pipefail exit1_pass_build.sh
exit1_fail/ad74175d: Test completed with returncode: 1
exit1_pass/be7df04d: Test completed with returncode: 1
exit1_fail/ad74175d: Test completed in 0.026673 seconds
exit1_pass/be7df04d: Test completed in 0.022852 seconds
exit1_fail/ad74175d: Writing output file -  /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_retur
ncode/exit1_fail/ad74175d/exit1_fail.out
exit1_pass/be7df04d: Writing output file -  /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_retur
ncode/exit1_pass/be7df04d/exit1_pass.out
exit1_fail/ad74175d: Writing error file - /home/docs/checkouts/readthedocs.org/u
ser_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_returnc
ode/exit1_fail/ad74175d/exit1_fail.err
exit1_pass/be7df04d: Writing error file - /home/docs/checkouts/readthedocs.org/u
ser_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_returnc
ode/exit1_pass/be7df04d/exit1_pass.err
exit1_pass/be7df04d: Checking returncode - 1 is matched in list [1]
returncode_list_mismatch/d7bd3e33: Running Test via command: bash --norc 
--noprofile -eo pipefail returncode_list_mismatch_build.sh
returncode_int_match/5673e4b8: Running Test via command: bash --norc --noprofile
-eo pipefail returncode_int_match_build.sh
returncode_int_match/5673e4b8: Test completed with returncode: 128
returncode_int_match/5673e4b8: Test completed in 0.025491 seconds
returncode_list_mismatch/d7bd3e33: Test completed with returncode: 2
returncode_int_match/5673e4b8: Writing output file -  /home/docs/checkouts/readt
hedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/
pass_returncode/returncode_int_match/5673e4b8/returncode_int_match.out
returncode_list_mismatch/d7bd3e33: Test completed in 0.03008 seconds
returncode_int_match/5673e4b8: Writing error file - /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pa
ss_returncode/returncode_int_match/5673e4b8/returncode_int_match.err
returncode_int_match/5673e4b8: Checking returncode - 128 is matched in list 
[128]
returncode_list_mismatch/d7bd3e33: Writing output file -  /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/pass_returncode/returncode_list_mismatch/d7bd3e33/returncode_list_mismatch.o
ut
returncode_list_mismatch/d7bd3e33: Writing error file - /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/pass_returncode/returncode_list_mismatch/d7bd3e33/returncode_list_mismatch.err
returncode_list_mismatch/d7bd3e33: Checking returncode - 2 is matched in list 
[1, 3]
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Builder      ┃ executor     ┃ status ┃ Checks        ┃ ReturnCode ┃ Runtime  ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃              ┃              ┃        ┃ Runtime)      ┃            ┃          ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ python_hello │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.103939 │
│ /d651c676    │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ exit1_fail/a │ generic.loc… │ FAIL   │ N/A N/A N/A   │ 1          │ 0.026673 │
│ d74175d      │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ exit1_pass/b │ generic.loc… │ PASS   │ True False    │ 1          │ 0.022852 │
│ e7df04d      │              │        │ False         │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ returncode_l │ generic.loc… │ FAIL   │ False False   │ 2          │ 0.03008  │
│ ist_mismatch │              │        │ False         │            │          │
│ /d7bd3e33    │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ returncode_i │ generic.loc… │ PASS   │ True False    │ 128        │ 0.025491 │
│ nt_match/567 │              │        │ False         │            │          │
│ 3e4b8        │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ circle_area/ │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.113954 │
│ 97fe42b7     │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



Passed Tests: 4/6 Percentage: 66.667%
Failed Tests: 2/6 Percentage: 33.333%


Adding 6 test results to /home/docs/checkouts/readthedocs.org/user_builds/buildt
est/checkouts/v0.12.0/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/logs/buildtest_dsl9tp1c.log

When multiple tags are specified, we search each tag independently and if it’s found in the buildspec cache we retrieve the buildspec file and add file to queue. This queue is a list of buildspecs that buildtest will process (i.e parse, build, run). You can query tags from buildspecs cache to see all available tags by running buildtest buildspec find --tags.

Note

The --tags is used for discovering buildspec file and not filtering tests by tag.

You can combine --tags with --buildspec to discover buildspecs in a single command. buildtest will query tags and buildspecs independently and combine all discovered buildspecs together.

$ buildtest build --tags pass --buildspec tutorials/python-hello.yml
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:11                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build --tags pass --buildspec             │
│ tutorials/python-hello.yml                                                   │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  2
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  2
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
                             Buildspecs By Tag=pass                             
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 2
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/pass_returncode.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/python-hello.yml: VALID
Total builder objects created: 5


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ exit1_fail/a2b176 │ generic.local.bas │ exit 1 by        │ /home/docs/checko │
│ be                │ h                 │ default is FAIL  │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ exit1_pass/4235d0 │ generic.local.bas │ report exit 1 as │ /home/docs/checko │
│ 94                │ h                 │ PASS             │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ returncode_list_m │ generic.local.bas │ exit 2 failed    │ /home/docs/checko │
│ ismatch/3234299f  │ h                 │ since it failed  │ uts/readthedocs.o │
│                   │                   │ to match         │ rg/user_builds/bu │
│                   │                   │ returncode 1     │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ returncode_int_ma │ generic.local.bas │ exit 128 matches │ /home/docs/checko │
│ tch/d10403bf      │ h                 │ returncode 128   │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ python_hello/8c3e │ generic.local.bas │ Hello World      │ /home/docs/checko │
│ f6df              │ h                 │ python           │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/python-hello.ym │
│                   │                   │                  │ l                 │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
exit1_fail/a2b176be: Creating test directory: /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_ret
urncode/exit1_fail/a2b176be
exit1_fail/a2b176be: Creating the stage directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pas
s_returncode/exit1_fail/a2b176be/stage
exit1_fail/a2b176be: Writing build script: /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_return
code/exit1_fail/a2b176be/exit1_fail_build.sh
exit1_pass/4235d094: Creating test directory: /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_ret
urncode/exit1_pass/4235d094
exit1_pass/4235d094: Creating the stage directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pas
s_returncode/exit1_pass/4235d094/stage
exit1_pass/4235d094: Writing build script: /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_return
code/exit1_pass/4235d094/exit1_pass_build.sh
returncode_list_mismatch/3234299f: Creating test directory: /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/pass_returncode/returncode_list_mismatch/3234299f
returncode_list_mismatch/3234299f: Creating the stage directory: /home/docs/chec
kouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.
local.bash/pass_returncode/returncode_list_mismatch/3234299f/stage
returncode_list_mismatch/3234299f: Writing build script: /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/pass_returncode/returncode_list_mismatch/3234299f/returncode_list_mismatch_bu
ild.sh
returncode_int_match/d10403bf: Creating test directory: /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/pass_returncode/returncode_int_match/d10403bf
returncode_int_match/d10403bf: Creating the stage directory: /home/docs/checkout
s/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loca
l.bash/pass_returncode/returncode_int_match/d10403bf/stage
returncode_int_match/d10403bf: Writing build script: /home/docs/checkouts/readth
edocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/p
ass_returncode/returncode_int_match/d10403bf/returncode_int_match_build.sh
python_hello/8c3ef6df: Creating test directory: /home/docs/checkouts/readthedocs
.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python
-hello/python_hello/8c3ef6df
python_hello/8c3ef6df: Creating the stage directory: /home/docs/checkouts/readth
edocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/p
ython-hello/python_hello/8c3ef6df/stage
python_hello/8c3ef6df: Writing build script: /home/docs/checkouts/readthedocs.or
g/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-he
llo/python_hello/8c3ef6df/python_hello_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
______________________________
Launching test: exit1_fail/a2b176be
______________________________
Launching test: exit1_pass/4235d094
______________________________
Launching test: returncode_list_mismatch/3234299f
______________________________
Launching test: returncode_int_match/d10403bf
______________________________
Launching test: python_hello/8c3ef6df
exit1_fail/a2b176be: Running Test via command: bash --norc --noprofile -eo 
pipefail exit1_fail_build.sh
exit1_pass/4235d094: Running Test via command: bash --norc --noprofile -eo 
pipefail exit1_pass_build.sh
exit1_pass/4235d094: Test completed with returncode: 1
exit1_fail/a2b176be: Test completed with returncode: 1
exit1_pass/4235d094: Test completed in 0.022015 seconds
exit1_fail/a2b176be: Test completed in 0.023819 seconds
exit1_fail/a2b176be: Writing output file -  /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_retur
ncode/exit1_fail/a2b176be/exit1_fail.out
exit1_pass/4235d094: Writing output file -  /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_retur
ncode/exit1_pass/4235d094/exit1_pass.out
exit1_fail/a2b176be: Writing error file - /home/docs/checkouts/readthedocs.org/u
ser_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_returnc
ode/exit1_fail/a2b176be/exit1_fail.err
exit1_pass/4235d094: Writing error file - /home/docs/checkouts/readthedocs.org/u
ser_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_returnc
ode/exit1_pass/4235d094/exit1_pass.err
exit1_pass/4235d094: Checking returncode - 1 is matched in list [1]
returncode_list_mismatch/3234299f: Running Test via command: bash --norc 
--noprofile -eo pipefail returncode_list_mismatch_build.sh
returncode_int_match/d10403bf: Running Test via command: bash --norc --noprofile
-eo pipefail returncode_int_match_build.sh
returncode_list_mismatch/3234299f: Test completed with returncode: 2
returncode_list_mismatch/3234299f: Test completed in 0.023997 seconds
returncode_list_mismatch/3234299f: Writing output file -  /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/pass_returncode/returncode_list_mismatch/3234299f/returncode_list_mismatch.o
ut
returncode_list_mismatch/3234299f: Writing error file - /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/pass_returncode/returncode_list_mismatch/3234299f/returncode_list_mismatch.err
returncode_list_mismatch/3234299f: Checking returncode - 2 is matched in list 
[1, 3]
returncode_int_match/d10403bf: Test completed with returncode: 128
returncode_int_match/d10403bf: Test completed in 0.030631 seconds
python_hello/8c3ef6df: Running Test via command: bash --norc --noprofile -eo 
pipefail python_hello_build.sh
returncode_int_match/d10403bf: Writing output file -  /home/docs/checkouts/readt
hedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/
pass_returncode/returncode_int_match/d10403bf/returncode_int_match.out
returncode_int_match/d10403bf: Writing error file - /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pa
ss_returncode/returncode_int_match/d10403bf/returncode_int_match.err
returncode_int_match/d10403bf: Checking returncode - 128 is matched in list 
[128]
python_hello/8c3ef6df: Test completed with returncode: 0
python_hello/8c3ef6df: Test completed in 0.049268 seconds
python_hello/8c3ef6df: Writing output file -  /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-h
ello/python_hello/8c3ef6df/python_hello.out
python_hello/8c3ef6df: Writing error file - /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-hel
lo/python_hello/8c3ef6df/python_hello.err
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Builder      ┃ executor     ┃ status ┃ Checks        ┃ ReturnCode ┃ Runtime  ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃              ┃              ┃        ┃ Runtime)      ┃            ┃          ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ exit1_fail/a │ generic.loc… │ FAIL   │ N/A N/A N/A   │ 1          │ 0.023819 │
│ 2b176be      │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ exit1_pass/4 │ generic.loc… │ PASS   │ True False    │ 1          │ 0.022015 │
│ 235d094      │              │        │ False         │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ returncode_l │ generic.loc… │ FAIL   │ False False   │ 2          │ 0.023997 │
│ ist_mismatch │              │        │ False         │            │          │
│ /3234299f    │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ returncode_i │ generic.loc… │ PASS   │ True False    │ 128        │ 0.030631 │
│ nt_match/d10 │              │        │ False         │            │          │
│ 403bf        │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ python_hello │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.049268 │
│ /8c3ef6df    │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



Passed Tests: 3/5 Percentage: 60.000%
Failed Tests: 2/5 Percentage: 40.000%


Adding 5 test results to /home/docs/checkouts/readthedocs.org/user_builds/buildt
est/checkouts/v0.12.0/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/logs/buildtest_aepe_sbp.log

As you may see, there are several ways to build buildspecs with buildtest. Tags is great way to build a whole collection of tests if you don’t know path to all the files. You can specify multiple tags per buildspecs to classify how test can be run.

Building by Executors

Every buildspec is associated to an executor which is responsible for running the test. You can instruct buildtest to run all tests by given executor via --executor option or short option -e. For instance, if you want to build all test associated to executor generic.local.csh you can run:

$ buildtest build --executor generic.local.csh

buildtest will query buildspec cache for the executor name and retrieve a list of buildspecs with matching executor name. To see a list of available executors in buildspec cache see querying buildspec executor.

Note

By default all tests are run in buildspec file. The buildtest build --executor option discovers buildspecs if one of the test matches the executor name. The --executor option is not filtering tests but only discovering buildspecs.

In this example we run all tests that are associated to generic.local.csh executor.

$ buildtest build --executor generic.local.csh
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:12                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build --executor generic.local.csh        │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  2
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  2
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
                    Buildspecs by Executor=generic.local.csh                    
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /bin/buildtest:16 in <module>                                                │
│                                                                              │
│   13                                                                         │
│   14 import buildtest.main                                                   │
│   15                                                                         │
│ ❱ 16 buildtest.main.main()                                                   │
│   17                                                                         │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ __annotations__ = {}                                                     │ │
│ │    __builtins__ = <module 'builtins' (built-in)>                         │ │
│ │      __cached__ = None                                                   │ │
│ │         __doc__ = None                                                   │ │
│ │        __file__ = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │      __loader__ = <_frozen_importlib_external.SourceFileLoader object at │ │
│ │                   0x7febd2af60d0>                                        │ │
│ │        __name__ = '__main__'                                             │ │
│ │     __package__ = None                                                   │ │
│ │        __spec__ = None                                                   │ │
│ │       buildtest = <module 'buildtest' from                               │ │
│ │                   '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │  buildtest_file = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │              os = <module 'os' from                                      │ │
│ │                   '/home/docs/.asdf/installs/python/3.7.12/lib/python3.… │ │
│ │          prefix = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │             sys = <module 'sys' (built-in)>                              │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/main.py:122 in main                                               │
│                                                                              │
│   119 │   │   │   │   account=args.account,                                  │
│   120 │   │   │   │   helpfilter=args.helpfilter,                            │
│   121 │   │   │   )                                                          │
│ ❱ 122 │   │   │   cmd.build()                                                │
│   123 │   │                                                                  │
│   124 │   │   build_history_dir = cmd.get_build_history_dir()                │
│   125 │   │   shutil.move(fname, os.path.join(build_history_dir, "output.txt │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │               args = Namespace(account=None, buildspec=None,             │ │
│ │                      configfile=None, debug=False,                       │ │
│ │                      disable_executor_check=True, exclude=None,          │ │
│ │                      executor=['generic.local.csh'], filter=None,        │ │
│ │                      helpfilter=False, keep_stage_dir=False,             │ │
│ │                      max_pend_time=None, no_color=False,                 │ │
│ │                      poll_interval=None, rebuild=None, report=None,      │ │
│ │                      retry=1, stage=None, subcommands='build',           │ │
│ │                      tags=None, testdir=None)                            │ │
│ │                cmd = <buildtest.cli.build.BuildTest object at            │ │
│ │                      0x7febd0fa0110>                                     │ │
│ │        config_file = None                                                │ │
│ │      configuration = <buildtest.config.SiteConfiguration object at       │ │
│ │                      0x7febd0f83710>                                     │ │
│ │              fname = '/home/docs/checkouts/readthedocs.org/user_builds/… │ │
│ │             logger = <Logger buildtest (DEBUG)>                          │ │
│ │           no_color = False                                               │ │
│ │             parser = ArgumentParser(prog='buildtest', usage='%(prog)s    │ │
│ │                      [options] [COMMANDS]', description='buildtest is a  │ │
│ │                      HPC testing framework for building and running      │ │
│ │                      tests.', formatter_class=<class                     │ │
│ │                      'argparse.RawDescriptionHelpFormatter'>,            │ │
│ │                      conflict_handler='error', add_help=True)            │ │
│ │             system = <buildtest.system.BuildTestSystem object at         │ │
│ │                      0x7febd0f83890>                                     │ │
│ │ validate_executors = True                                                │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/cli/build.py:677 in build                                         │
│                                                                              │
│    674 │   │                                                                 │
│    675 │   │   # Parse all buildspecs and skip any buildspecs that fail vali │
│    676 │   │   # is a builder object used for building test.                 │
│ ❱  677 │   │   self.parse_buildspecs()                                       │
│    678 │   │                                                                 │
│    679 │   │   # if no builders found or  --stage=parse set we return from m │
│    680 │   │   if not self.builders or self.stage == "parse":                │
│                                                                              │
│ ╭──────────────────────────── locals ─────────────────────────────╮          │
│ │ self = <buildtest.cli.build.BuildTest object at 0x7febd0fa0110> │          │
│ ╰─────────────────────────────────────────────────────────────────╯          │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/cli/build.py:747 in parse_buildspecs                              │
│                                                                              │
│    744 │   │   │   │   testdir=self.testdir,                                 │
│    745 │   │   │   │   rebuild=self.rebuild,                                 │
│    746 │   │   │   │   buildtest_system=self.system,                         │
│ ❱  747 │   │   │   │   configuration=self.configuration,                     │
│    748 │   │   │   )                                                         │
│    749 │   │   │                                                             │
│    750 │   │   │   if not builder.get_builders():                            │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │                  bp = [buildspec-parser]                                 │ │
│ │             builder = <buildtest.buildsystem.builders.Builder object at  │ │
│ │                       0x7febd0f757d0>                                    │ │
│ │           buildspec = '/home/docs/checkouts/readthedocs.org/user_builds… │ │
│ │ filtered_buildspecs = []                                                 │ │
│ │                self = <buildtest.cli.build.BuildTest object at           │ │
│ │                       0x7febd0fa0110>                                    │ │
│ │    valid_buildspecs = [                                                  │ │
│ │                       │                                                  │ │
│ │                       '/home/docs/checkouts/readthedocs.org/user_builds… │ │
│ │                       │                                                  │ │
│ │                       '/home/docs/checkouts/readthedocs.org/user_builds… │ │
│ │                       ]                                                  │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/buildsystem/builders.py:105 in __init__                           │
│                                                                              │
│   102 │   │   │   │                                                          │
│   103 │   │   │   │   # Add the builder for the script or spack schema       │
│   104 │   │   │   │   if recipe["type"] in ["script", "spack"]:              │
│ ❱ 105 │   │   │   │   │   self.builders += self._generate_builders(recipe, n │
│   106 │   │   │   │                                                          │
│   107 │   │   │   │   elif recipe["type"] == "compiler":                     │
│   108                                                                        │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │               bp = [buildspec-parser]                                    │ │
│ │    buildexecutor = [buildtest-executor]                                  │ │
│ │ buildtest_system = <buildtest.system.BuildTestSystem object at           │ │
│ │                    0x7febd0f83890>                                       │ │
│ │    configuration = <buildtest.config.SiteConfiguration object at         │ │
│ │                    0x7febd0f83710>                                       │ │
│ │            count = 0                                                     │ │
│ │          filters = None                                                  │ │
│ │             name = 'tcsh_env_declaration'                                │ │
│ │          rebuild = None                                                  │ │
│ │           recipe = {                                                     │ │
│ │                    │   'executor': 'generic.local.csh',                  │ │
│ │                    │   'type': 'script',                                 │ │
│ │                    │   'description': 'tcsh shell example to declare     │ │
│ │                    environment variables',                               │ │
│ │                    │   'shell': '/bin/tcsh',                             │ │
│ │                    │   'tags': ['tutorials'],                            │ │
│ │                    │   'env': {'path': '/usr/local/bin:$PATH'},          │ │
│ │                    │   'run': 'echo $path'                               │ │
│ │                    }                                                     │ │
│ │             self = <buildtest.buildsystem.builders.Builder object at     │ │
│ │                    0x7febd0fa38d0>                                       │ │
│ │          testdir = '/home/docs/checkouts/readthedocs.org/user_builds/bu… │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/buildsystem/builders.py:148 in _generate_builders                 │
│                                                                              │
│   145 │   │   │   │   │   executor=executor,                                 │
│   146 │   │   │   │   │   buildspec=self.bp.buildspec,                       │
│   147 │   │   │   │   │   buildexecutor=self.buildexecutor,                  │
│ ❱ 148 │   │   │   │   │   testdir=self.testdir,                              │
│   149 │   │   │   │   )                                                      │
│   150 │   │   │                                                              │
│   151 │   │   │   elif (                                                     │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │       builder = None                                                     │ │
│ │      builders = []                                                       │ │
│ │ compiler_name = None                                                     │ │
│ │      executor = 'generic.local.csh'                                      │ │
│ │          name = 'tcsh_env_declaration'                                   │ │
│ │        recipe = {                                                        │ │
│ │                 │   'executor': 'generic.local.csh',                     │ │
│ │                 │   'type': 'script',                                    │ │
│ │                 │   'description': 'tcsh shell example to declare        │ │
│ │                 environment variables',                                  │ │
│ │                 │   'shell': '/bin/tcsh',                                │ │
│ │                 │   'tags': ['tutorials'],                               │ │
│ │                 │   'env': {'path': '/usr/local/bin:$PATH'},             │ │
│ │                 │   'run': 'echo $path'                                  │ │
│ │                 }                                                        │ │
│ │          self = <buildtest.buildsystem.builders.Builder object at        │ │
│ │                 0x7febd0fa38d0>                                          │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/buildsystem/scriptbuilder.py:23 in __init__                       │
│                                                                              │
│    20 │   │   │   buildspec=buildspec,                                       │
│    21 │   │   │   executor=executor,                                         │
│    22 │   │   │   buildexecutor=buildexecutor,                               │
│ ❱  23 │   │   │   testdir=testdir,                                           │
│    24 │   │   )                                                              │
│    25 │   │                                                                  │
│    26 │   │   self.status = deep_get(                                        │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │     __class__ = <class                                                   │ │
│ │                 'buildtest.buildsystem.scriptbuilder.ScriptBuilder'>     │ │
│ │ buildexecutor = [buildtest-executor]                                     │ │
│ │     buildspec = '/home/docs/checkouts/readthedocs.org/user_builds/build… │ │
│ │      executor = 'generic.local.csh'                                      │ │
│ │          name = 'tcsh_env_declaration'                                   │ │
│ │        recipe = {                                                        │ │
│ │                 │   'executor': 'generic.local.csh',                     │ │
│ │                 │   'type': 'script',                                    │ │
│ │                 │   'description': 'tcsh shell example to declare        │ │
│ │                 environment variables',                                  │ │
│ │                 │   'shell': '/bin/tcsh',                                │ │
│ │                 │   'tags': ['tutorials'],                               │ │
│ │                 │   'env': {'path': '/usr/local/bin:$PATH'},             │ │
│ │                 │   'run': 'echo $path'                                  │ │
│ │                 }                                                        │ │
│ │          self = tcsh_env_declaration/5dc48350                            │ │
│ │       testdir = '/home/docs/checkouts/readthedocs.org/user_builds/build… │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/buildsystem/base.py:116 in __init__                               │
│                                                                              │
│    113 │   │   self.test_uid = str(uuid.uuid4())                             │
│    114 │   │                                                                 │
│    115 │   │   self._set_metadata_values()                                   │
│ ❱  116 │   │   self.shell_detection()                                        │
│    117 │   │   self.sched_init()                                             │
│    118 │                                                                     │
│    119 │   def shell_detection(self):                                        │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ buildexecutor = [buildtest-executor]                                     │ │
│ │     buildspec = '/home/docs/checkouts/readthedocs.org/user_builds/build… │ │
│ │      executor = 'generic.local.csh'                                      │ │
│ │     file_name = 'environment'                                            │ │
│ │          name = 'tcsh_env_declaration'                                   │ │
│ │        recipe = {                                                        │ │
│ │                 │   'executor': 'generic.local.csh',                     │ │
│ │                 │   'type': 'script',                                    │ │
│ │                 │   'description': 'tcsh shell example to declare        │ │
│ │                 environment variables',                                  │ │
│ │                 │   'shell': '/bin/tcsh',                                │ │
│ │                 │   'tags': ['tutorials'],                               │ │
│ │                 │   'env': {'path': '/usr/local/bin:$PATH'},             │ │
│ │                 │   'run': 'echo $path'                                  │ │
│ │                 }                                                        │ │
│ │          self = tcsh_env_declaration/5dc48350                            │ │
│ │       testdir = '/home/docs/checkouts/readthedocs.org/user_builds/build… │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/buildsystem/base.py:125 in shell_detection                        │
│                                                                              │
│    122 │   │   # The default shell will be bash                              │
│    123 │   │   self.default_shell = Shell()                                  │
│    124 │   │                                                                 │
│ ❱  125 │   │   self.shell = Shell(self.recipe.get("shell", "bash"))          │
│    126 │   │                                                                 │
│    127 │   │   # set shebang to value defined in Buildspec, if not defined t │
│    128 │   │   self.shebang = (                                              │
│                                                                              │
│ ╭─────────────── locals ───────────────╮                                     │
│ │ self = tcsh_env_declaration/5dc48350 │                                     │
│ ╰──────────────────────────────────────╯                                     │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/utils/shell.py:155 in __init__                                    │
│                                                                              │
│   152 │   │   # if input shell is not in list of valid shells we raise error │
│   153 │   │   if self.name not in self.valid_shells:                         │
│   154 │   │   │   raise BuildTestError(                                      │
│ ❱ 155 │   │   │   │   f"Invalid shell: {self.name} select from one of the fo │
│   156 │   │   │   )                                                          │
│   157 │   │                                                                  │
│   158 │   │   self._opts = " ".join(shell.split()[1:])                       │
│                                                                              │
│ ╭─────────────── locals ───────────────╮                                     │
│ │  self = [buildtest.shell][/bin/tcsh] │                                     │
│ │ shell = '/bin/tcsh'                  │                                     │
│ ╰──────────────────────────────────────╯                                     │
╰──────────────────────────────────────────────────────────────────────────────╯
BuildTestError: "Invalid shell: /bin/tcsh select from one of the following 
shells: ['/bin/sh', '/bin/bash', '/usr/bin/bash', '/bin/rbash', 
'/usr/bin/rbash', '/bin/dash', '/usr/bin/dash', '/bin/csh', '/usr/bin/csh', 
'/bin/zsh', '/usr/bin/zsh', '/home/docs/checkouts/readthedocs.org/user_builds/bu
ildtest/envs/v0.12.0/bin/python', '/home/docs/.asdf/shims/python', '/home/docs/c
heckouts/readthedocs.org/user_builds/buildtest/envs/v0.12.0/bin/python3', 
'/home/docs/.asdf/shims/python3', '/usr/bin/python3', '/bin/python3', 'bash', 
'csh', 'tcsh', 'sh', 'zsh', 'python', 'python3']"

Note

The --executor option can be appended to discover tests by multiple executors.

Filtering Buildspecs

buildtest has support for filtering buildspecs based on certain attributes defined in buildspec file. Upon Discover Buildspecs, buildtest will filter out tests or entire buildspec files. The buildtest build --filter option can be used to filter buildspecs which expects a single key=value pair. Currently, buildtest can filter tests based on tags, type and maintainers.

To see all available filter fields you can run buildtest build --helpfilter and buildtest will report the fields followed by description.

$ buildtest build --helpfilter
                 Buildtest Filters                  
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Field       ┃ Description                        ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ tags        │ Filter tests by 'tag' field        │
│ type        │ Filter test by 'type' field        │
│ maintainers │ Filter test by 'maintainers' field │
└─────────────┴────────────────────────────────────┘
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /bin/buildtest:16 in <module>                                                │
│                                                                              │
│   13                                                                         │
│   14 import buildtest.main                                                   │
│   15                                                                         │
│ ❱ 16 buildtest.main.main()                                                   │
│   17                                                                         │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ __annotations__ = {}                                                     │ │
│ │    __builtins__ = <module 'builtins' (built-in)>                         │ │
│ │      __cached__ = None                                                   │ │
│ │         __doc__ = None                                                   │ │
│ │        __file__ = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │      __loader__ = <_frozen_importlib_external.SourceFileLoader object at │ │
│ │                   0x7f88de4aa0d0>                                        │ │
│ │        __name__ = '__main__'                                             │ │
│ │     __package__ = None                                                   │ │
│ │        __spec__ = None                                                   │ │
│ │       buildtest = <module 'buildtest' from                               │ │
│ │                   '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │  buildtest_file = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │              os = <module 'os' from                                      │ │
│ │                   '/home/docs/.asdf/installs/python/3.7.12/lib/python3.… │ │
│ │          prefix = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │             sys = <module 'sys' (built-in)>                              │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/main.py:124 in main                                               │
│                                                                              │
│   121 │   │   │   )                                                          │
│   122 │   │   │   cmd.build()                                                │
│   123 │   │                                                                  │
│ ❱ 124 │   │   build_history_dir = cmd.get_build_history_dir()                │
│   125 │   │   shutil.move(fname, os.path.join(build_history_dir, "output.txt │
│   126 │                                                                      │
│   127 │   elif args.subcommands in ["edit", "et"]:                           │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │               args = Namespace(account=None, buildspec=None,             │ │
│ │                      configfile=None, debug=False,                       │ │
│ │                      disable_executor_check=True, exclude=None,          │ │
│ │                      executor=None, filter=None, helpfilter=True,        │ │
│ │                      keep_stage_dir=False, max_pend_time=None,           │ │
│ │                      no_color=False, poll_interval=None, rebuild=None,   │ │
│ │                      report=None, retry=1, stage=None,                   │ │
│ │                      subcommands='build', tags=None, testdir=None)       │ │
│ │                cmd = <buildtest.cli.build.BuildTest object at            │ │
│ │                      0x7f88dc954090>                                     │ │
│ │        config_file = None                                                │ │
│ │      configuration = <buildtest.config.SiteConfiguration object at       │ │
│ │                      0x7f88dc936650>                                     │ │
│ │              fname = '/home/docs/checkouts/readthedocs.org/user_builds/… │ │
│ │             logger = <Logger buildtest (DEBUG)>                          │ │
│ │           no_color = False                                               │ │
│ │             parser = ArgumentParser(prog='buildtest', usage='%(prog)s    │ │
│ │                      [options] [COMMANDS]', description='buildtest is a  │ │
│ │                      HPC testing framework for building and running      │ │
│ │                      tests.', formatter_class=<class                     │ │
│ │                      'argparse.RawDescriptionHelpFormatter'>,            │ │
│ │                      conflict_handler='error', add_help=True)            │ │
│ │             system = <buildtest.system.BuildTestSystem object at         │ │
│ │                      0x7f88dc9367d0>                                     │ │
│ │ validate_executors = True                                                │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/cli/build.py:1098 in get_build_history_dir                        │
│                                                                              │
│   1095 │                                                                     │
│   1096 │   def get_build_history_dir(self):                                  │
│   1097 │   │   """Return root of build history directory"""                  │
│ ❱ 1098 │   │   return self.build_history_dir                                 │
│   1099                                                                       │
│   1100                                                                       │
│   1101 def update_report(valid_builders, report_file):                       │
│                                                                              │
│ ╭──────────────────────────── locals ─────────────────────────────╮          │
│ │ self = <buildtest.cli.build.BuildTest object at 0x7f88dc954090> │          │
│ ╰─────────────────────────────────────────────────────────────────╯          │
╰──────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'BuildTest' object has no attribute 'build_history_dir'

In this example, we will discover all buildspecs based on tagname pass and then filter each test by tagname pass specified by --filter tags=pass.

$ buildtest build -t pass --filter tags=pass
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:13                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -t pass --filter tags=pass          │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  1
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
                             Buildspecs By Tag=pass                             
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
[exit1_fail][/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tutorials/pass_returncode.yml]: test is skipped because it is not in tag filter list: {'tags': 'pass'}
[returncode_list_mismatch][/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tutorials/pass_returncode.yml]: test is skipped because it is not in tag filter list: {'tags': 'pass'}
Valid Buildspecs: 1
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/pass_returncode.yml: VALID
Total builder objects created: 2


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ exit1_pass/64bac6 │ generic.local.bas │ report exit 1 as │ /home/docs/checko │
│ eb                │ h                 │ PASS             │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ returncode_int_ma │ generic.local.bas │ exit 128 matches │ /home/docs/checko │
│ tch/fa4ab34d      │ h                 │ returncode 128   │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
exit1_pass/64bac6eb: Creating test directory: /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_ret
urncode/exit1_pass/64bac6eb
exit1_pass/64bac6eb: Creating the stage directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pas
s_returncode/exit1_pass/64bac6eb/stage
exit1_pass/64bac6eb: Writing build script: /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_return
code/exit1_pass/64bac6eb/exit1_pass_build.sh
returncode_int_match/fa4ab34d: Creating test directory: /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/pass_returncode/returncode_int_match/fa4ab34d
returncode_int_match/fa4ab34d: Creating the stage directory: /home/docs/checkout
s/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loca
l.bash/pass_returncode/returncode_int_match/fa4ab34d/stage
returncode_int_match/fa4ab34d: Writing build script: /home/docs/checkouts/readth
edocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/p
ass_returncode/returncode_int_match/fa4ab34d/returncode_int_match_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
______________________________
Launching test: exit1_pass/64bac6eb
______________________________
Launching test: returncode_int_match/fa4ab34d
exit1_pass/64bac6eb: Running Test via command: bash --norc --noprofile -eo 
pipefail exit1_pass_build.sh
returncode_int_match/fa4ab34d: Running Test via command: bash --norc --noprofile
-eo pipefail returncode_int_match_build.sh
returncode_int_match/fa4ab34d: Test completed with returncode: 128
returncode_int_match/fa4ab34d: Test completed in 0.018591 seconds
returncode_int_match/fa4ab34d: Writing output file -  /home/docs/checkouts/readt
hedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/
pass_returncode/returncode_int_match/fa4ab34d/returncode_int_match.out
returncode_int_match/fa4ab34d: Writing error file - /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pa
ss_returncode/returncode_int_match/fa4ab34d/returncode_int_match.err
returncode_int_match/fa4ab34d: Checking returncode - 128 is matched in list 
[128]
exit1_pass/64bac6eb: Test completed with returncode: 1
exit1_pass/64bac6eb: Test completed in 0.030858 seconds
exit1_pass/64bac6eb: Writing output file -  /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_retur
ncode/exit1_pass/64bac6eb/exit1_pass.out
exit1_pass/64bac6eb: Writing error file - /home/docs/checkouts/readthedocs.org/u
ser_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_returnc
ode/exit1_pass/64bac6eb/exit1_pass.err
exit1_pass/64bac6eb: Checking returncode - 1 is matched in list [1]
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Builder      ┃ executor     ┃ status ┃ Checks        ┃ ReturnCode ┃ Runtime  ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃              ┃              ┃        ┃ Runtime)      ┃            ┃          ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ exit1_pass/6 │ generic.loc… │ PASS   │ True False    │ 1          │ 0.030858 │
│ 4bac6eb      │              │        │ False         │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ returncode_i │ generic.loc… │ PASS   │ True False    │ 128        │ 0.018591 │
│ nt_match/fa4 │              │        │ False         │            │          │
│ ab34d        │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



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


Adding 2 test results to /home/docs/checkouts/readthedocs.org/user_builds/buildt
est/checkouts/v0.12.0/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/logs/buildtest_95pve2v7.log

buildtest can run filter tests by maintainers, this can be useful if you want to run tests that you are maintainer. The maintainers field is set per buildspec and not each test. You can filter maintiners via --filter maintainers=<MAINTAINER_NAME>. If the maintainers field is not specified the buildspec will be filtered out if --filter maintainers is specified. In this next example, we will build all tests for maintainer @shahzebsiddiqui.

$ buildtest build -b tutorials --filter maintainers=@shahzebsiddiqui
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:14                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -b tutorials --filter               │
│ maintainers=@shahzebsiddiqui                                                 │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  31
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  31
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/root_user.yml: skipping test because 'maintainers' field is not specified
in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/script/multiple_executors.yml: skipping test because 'maintainers' field 
is not specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/pass_returncode.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/runtime_status_test.yml: skipping test because 'maintainers' field is not
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/executor_regex_script.yml: skipping test because 'maintainers' field is 
not specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/selinux.yml: skipping test because 'maintainers' field is not specified 
in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/python-hello.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/metrics_variable.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/sleep.yml: skipping test because 'maintainers' field is not specified in 
buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/run_only_distro.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/skip_tests.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/environment.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/csh_shell_examples.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/python-shell.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/script/status_by_executors.yml: skipping test because 'maintainers' field
is not specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/maintainers_example.yml: unable to find maintainer: @shahzebsiddiqui in 
buildspec which contains the following maintainers: ['@johndoe', '@bobsmith'] 
therefore we skip this test
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/script/executor_scheduler.yml: skipping test because 'maintainers' field 
is not specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/shell_examples.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/add_numbers.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/shebang.yml: skipping test because 'maintainers' field is not specified 
in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/explicit_state.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/metrics_regex.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/run_only_platform.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/status_regex.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/vars.yml: skipping test because 'maintainers' field is not specified in 
buildspec.
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/tags_example.yml: skipping test because 'maintainers' field is not 
specified in buildspec.
Valid Buildspecs: 27
Invalid Buildspecs: 4
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/root_user.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/script/multiple_executors.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/pass_returncode.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/runtime_status_test.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/executor_regex_script.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/selinux.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/python-hello.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/metrics_variable.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/sleep.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/run_only_distro.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/skip_tests.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/environment.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/csh_shell_examples.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/python-shell.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/script/status_by_executors.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/hello_world.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/maintainers_example.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/script/executor_scheduler.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/shell_examples.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/add_numbers.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/shebang.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/explicit_state.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/metrics_regex.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/run_only_platform.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/status_regex.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/vars.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/tags_example.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/burstbuffer_datawarp_executors.yml: INVALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/invalid_executor.yml: INVALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/invalid_buildspec_section.yml: INVALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/invalid_tags.yml: INVALID
                            Buildspecs Filtered out                             
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Buildspecs                                                                   ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… │
└──────────────────────────────────────────────────────────────────────────────┘
Total builder objects created: 1


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ hello_world/6e359 │ generic.local.bas │ hello world      │ /home/docs/checko │
│ 1db               │ h                 │ example          │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/hello_world.yml │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
hello_world/6e3591db: Creating test directory: /home/docs/checkouts/readthedocs.
org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/hello_w
orld/hello_world/6e3591db
hello_world/6e3591db: Creating the stage directory: /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/he
llo_world/hello_world/6e3591db/stage
hello_world/6e3591db: Writing build script: /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/hello_worl
d/hello_world/6e3591db/hello_world_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
______________________________
Launching test: hello_world/6e3591db
hello_world/6e3591db: Running Test via command: bash --norc --noprofile -eo 
pipefail hello_world_build.sh
hello_world/6e3591db: Test completed with returncode: 0
hello_world/6e3591db: Test completed in 0.00697 seconds
hello_world/6e3591db: Writing output file -  /home/docs/checkouts/readthedocs.or
g/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/hello_wor
ld/hello_world/6e3591db/hello_world.out
hello_world/6e3591db: Writing error file - /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/hello_world
/hello_world/6e3591db/hello_world.err
                                  Test Summary                                  
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┓
┃ Builder       ┃ executor     ┃ status ┃ Checks        ┃ ReturnCode ┃ Runtime ┃
┃               ┃              ┃        ┃ (ReturnCode,  ┃            ┃         ┃
┃               ┃              ┃        ┃ Regex,        ┃            ┃         ┃
┃               ┃              ┃        ┃ Runtime)      ┃            ┃         ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━┩
│ hello_world/6 │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.00697 │
│ e3591db       │              │        │               │            │         │
└───────────────┴──────────────┴────────┴───────────────┴────────────┴─────────┘



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


Adding 1 test results to /home/docs/checkouts/readthedocs.org/user_builds/buildt
est/checkouts/v0.12.0/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/logs/buildtest_cwqxkkmj.log

Please see Query Maintainers on list of maintainers and breakdown of buildspecs by maintainers.

We can also filter tests by type field in the buildspec which corresponds to the schema type. In this next example, we filter all tests by script schema type by passing option --filter type=script. We inform buildtest to stop after build stage (--stage=build) for more details see Configure Build Stages.

$ buildtest build -b tutorials --filter type=script --stage=build
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:14                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -b tutorials --filter type=script   │
│ --stage=build                                                                │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  31
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  31
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
[run_only_platform_darwin][/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tutorials/run_only_platform.yml]: test is skipped because this test is expected to run on platform: Darwin but detected platform: Linux.
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /bin/buildtest:16 in <module>                                                │
│                                                                              │
│   13                                                                         │
│   14 import buildtest.main                                                   │
│   15                                                                         │
│ ❱ 16 buildtest.main.main()                                                   │
│   17                                                                         │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ __annotations__ = {}                                                     │ │
│ │    __builtins__ = <module 'builtins' (built-in)>                         │ │
│ │      __cached__ = None                                                   │ │
│ │         __doc__ = None                                                   │ │
│ │        __file__ = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │      __loader__ = <_frozen_importlib_external.SourceFileLoader object at │ │
│ │                   0x7fc46cb79210>                                        │ │
│ │        __name__ = '__main__'                                             │ │
│ │     __package__ = None                                                   │ │
│ │        __spec__ = None                                                   │ │
│ │       buildtest = <module 'buildtest' from                               │ │
│ │                   '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │  buildtest_file = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │              os = <module 'os' from                                      │ │
│ │                   '/home/docs/.asdf/installs/python/3.7.12/lib/python3.… │ │
│ │          prefix = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │             sys = <module 'sys' (built-in)>                              │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/main.py:122 in main                                               │
│                                                                              │
│   119 │   │   │   │   account=args.account,                                  │
│   120 │   │   │   │   helpfilter=args.helpfilter,                            │
│   121 │   │   │   )                                                          │
│ ❱ 122 │   │   │   cmd.build()                                                │
│   123 │   │                                                                  │
│   124 │   │   build_history_dir = cmd.get_build_history_dir()                │
│   125 │   │   shutil.move(fname, os.path.join(build_history_dir, "output.txt │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │               args = Namespace(account=None, buildspec=['tutorials'],    │ │
│ │                      configfile=None, debug=False,                       │ │
│ │                      disable_executor_check=True, exclude=None,          │ │
│ │                      executor=None, filter={'type': 'script'},           │ │
│ │                      helpfilter=False, keep_stage_dir=False,             │ │
│ │                      max_pend_time=None, no_color=False,                 │ │
│ │                      poll_interval=None, rebuild=None, report=None,      │ │
│ │                      retry=1, stage='build', subcommands='build',        │ │
│ │                      tags=None, testdir=None)                            │ │
│ │                cmd = <buildtest.cli.build.BuildTest object at            │ │
│ │                      0x7fc46b0230d0>                                     │ │
│ │        config_file = None                                                │ │
│ │      configuration = <buildtest.config.SiteConfiguration object at       │ │
│ │                      0x7fc46b005e90>                                     │ │
│ │              fname = '/home/docs/checkouts/readthedocs.org/user_builds/… │ │
│ │             logger = <Logger buildtest (DEBUG)>                          │ │
│ │           no_color = False                                               │ │
│ │             parser = ArgumentParser(prog='buildtest', usage='%(prog)s    │ │
│ │                      [options] [COMMANDS]', description='buildtest is a  │ │
│ │                      HPC testing framework for building and running      │ │
│ │                      tests.', formatter_class=<class                     │ │
│ │                      'argparse.RawDescriptionHelpFormatter'>,            │ │
│ │                      conflict_handler='error', add_help=True)            │ │
│ │             system = <buildtest.system.BuildTestSystem object at         │ │
│ │                      0x7fc46b0059d0>                                     │ │
│ │ validate_executors = True                                                │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/cli/build.py:677 in build                                         │
│                                                                              │
│    674 │   │                                                                 │
│    675 │   │   # Parse all buildspecs and skip any buildspecs that fail vali │
│    676 │   │   # is a builder object used for building test.                 │
│ ❱  677 │   │   self.parse_buildspecs()                                       │
│    678 │   │                                                                 │
│    679 │   │   # if no builders found or  --stage=parse set we return from m │
│    680 │   │   if not self.builders or self.stage == "parse":                │
│                                                                              │
│ ╭──────────────────────────── locals ─────────────────────────────╮          │
│ │ self = <buildtest.cli.build.BuildTest object at 0x7fc46b0230d0> │          │
│ ╰─────────────────────────────────────────────────────────────────╯          │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/cli/build.py:747 in parse_buildspecs                              │
│                                                                              │
│    744 │   │   │   │   testdir=self.testdir,                                 │
│    745 │   │   │   │   rebuild=self.rebuild,                                 │
│    746 │   │   │   │   buildtest_system=self.system,                         │
│ ❱  747 │   │   │   │   configuration=self.configuration,                     │
│    748 │   │   │   )                                                         │
│    749 │   │   │                                                             │
│    750 │   │   │   if not builder.get_builders():                            │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │                  bp = [buildspec-parser]                                 │ │
│ │             builder = <buildtest.buildsystem.builders.Builder object at  │ │
│ │                       0x7fc46afb8990>                                    │ │
│ │           buildspec = '/home/docs/checkouts/readthedocs.org/user_builds… │ │
│ │ filtered_buildspecs = []                                                 │ │
│ │                self = <buildtest.cli.build.BuildTest object at           │ │
│ │                       0x7fc46b0230d0>                                    │ │
│ │    valid_buildspecs = [                                                  │ │
│ │                       │                                                  │ │
│ │                       '/home/docs/checkouts/readthedocs.org/user_builds… │ │
│ │                       │                                                  │ │
│ │                       '/home/docs/checkouts/readthedocs.org/user_builds… │ │
│ │                       │                                                  │ │
│ │                       '/home/docs/checkouts/readthedocs.org/user_builds… │ │
│ │                       │                                                  │ │
│ │                       '/home/docs/checkouts/readthedocs.org/user_builds… │ │
│ │                       │                                                  │ │
│ │                       '/home/docs/checkouts/readthedocs.org/user_builds… │ │
│ │                       │                                                  │ │
│ │                       '/home/docs/checkouts/readthedocs.org/user_builds… │ │
│ │                       │                                                  │ │
│ │                       '/home/docs/checkouts/readthedocs.org/user_builds… │ │
│ │                       ]                                                  │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/buildsystem/builders.py:105 in __init__                           │
│                                                                              │
│   102 │   │   │   │                                                          │
│   103 │   │   │   │   # Add the builder for the script or spack schema       │
│   104 │   │   │   │   if recipe["type"] in ["script", "spack"]:              │
│ ❱ 105 │   │   │   │   │   self.builders += self._generate_builders(recipe, n │
│   106 │   │   │   │                                                          │
│   107 │   │   │   │   elif recipe["type"] == "compiler":                     │
│   108                                                                        │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │               bp = [buildspec-parser]                                    │ │
│ │    buildexecutor = [buildtest-executor]                                  │ │
│ │ buildtest_system = <buildtest.system.BuildTestSystem object at           │ │
│ │                    0x7fc46b0059d0>                                       │ │
│ │    configuration = <buildtest.config.SiteConfiguration object at         │ │
│ │                    0x7fc46b005e90>                                       │ │
│ │            count = 0                                                     │ │
│ │          filters = {'type': 'script'}                                    │ │
│ │             name = 'tcsh_env_declaration'                                │ │
│ │          rebuild = None                                                  │ │
│ │           recipe = {                                                     │ │
│ │                    │   'executor': 'generic.local.csh',                  │ │
│ │                    │   'type': 'script',                                 │ │
│ │                    │   'description': 'tcsh shell example to declare     │ │
│ │                    environment variables',                               │ │
│ │                    │   'shell': '/bin/tcsh',                             │ │
│ │                    │   'tags': ['tutorials'],                            │ │
│ │                    │   'env': {'path': '/usr/local/bin:$PATH'},          │ │
│ │                    │   'run': 'echo $path'                               │ │
│ │                    }                                                     │ │
│ │             self = <buildtest.buildsystem.builders.Builder object at     │ │
│ │                    0x7fc46b005510>                                       │ │
│ │          testdir = '/home/docs/checkouts/readthedocs.org/user_builds/bu… │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/buildsystem/builders.py:148 in _generate_builders                 │
│                                                                              │
│   145 │   │   │   │   │   executor=executor,                                 │
│   146 │   │   │   │   │   buildspec=self.bp.buildspec,                       │
│   147 │   │   │   │   │   buildexecutor=self.buildexecutor,                  │
│ ❱ 148 │   │   │   │   │   testdir=self.testdir,                              │
│   149 │   │   │   │   )                                                      │
│   150 │   │   │                                                              │
│   151 │   │   │   elif (                                                     │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │       builder = None                                                     │ │
│ │      builders = []                                                       │ │
│ │ compiler_name = None                                                     │ │
│ │      executor = 'generic.local.csh'                                      │ │
│ │          name = 'tcsh_env_declaration'                                   │ │
│ │        recipe = {                                                        │ │
│ │                 │   'executor': 'generic.local.csh',                     │ │
│ │                 │   'type': 'script',                                    │ │
│ │                 │   'description': 'tcsh shell example to declare        │ │
│ │                 environment variables',                                  │ │
│ │                 │   'shell': '/bin/tcsh',                                │ │
│ │                 │   'tags': ['tutorials'],                               │ │
│ │                 │   'env': {'path': '/usr/local/bin:$PATH'},             │ │
│ │                 │   'run': 'echo $path'                                  │ │
│ │                 }                                                        │ │
│ │          self = <buildtest.buildsystem.builders.Builder object at        │ │
│ │                 0x7fc46b005510>                                          │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/buildsystem/scriptbuilder.py:23 in __init__                       │
│                                                                              │
│    20 │   │   │   buildspec=buildspec,                                       │
│    21 │   │   │   executor=executor,                                         │
│    22 │   │   │   buildexecutor=buildexecutor,                               │
│ ❱  23 │   │   │   testdir=testdir,                                           │
│    24 │   │   )                                                              │
│    25 │   │                                                                  │
│    26 │   │   self.status = deep_get(                                        │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │     __class__ = <class                                                   │ │
│ │                 'buildtest.buildsystem.scriptbuilder.ScriptBuilder'>     │ │
│ │ buildexecutor = [buildtest-executor]                                     │ │
│ │     buildspec = '/home/docs/checkouts/readthedocs.org/user_builds/build… │ │
│ │      executor = 'generic.local.csh'                                      │ │
│ │          name = 'tcsh_env_declaration'                                   │ │
│ │        recipe = {                                                        │ │
│ │                 │   'executor': 'generic.local.csh',                     │ │
│ │                 │   'type': 'script',                                    │ │
│ │                 │   'description': 'tcsh shell example to declare        │ │
│ │                 environment variables',                                  │ │
│ │                 │   'shell': '/bin/tcsh',                                │ │
│ │                 │   'tags': ['tutorials'],                               │ │
│ │                 │   'env': {'path': '/usr/local/bin:$PATH'},             │ │
│ │                 │   'run': 'echo $path'                                  │ │
│ │                 }                                                        │ │
│ │          self = tcsh_env_declaration/c23c64e6                            │ │
│ │       testdir = '/home/docs/checkouts/readthedocs.org/user_builds/build… │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/buildsystem/base.py:116 in __init__                               │
│                                                                              │
│    113 │   │   self.test_uid = str(uuid.uuid4())                             │
│    114 │   │                                                                 │
│    115 │   │   self._set_metadata_values()                                   │
│ ❱  116 │   │   self.shell_detection()                                        │
│    117 │   │   self.sched_init()                                             │
│    118 │                                                                     │
│    119 │   def shell_detection(self):                                        │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ buildexecutor = [buildtest-executor]                                     │ │
│ │     buildspec = '/home/docs/checkouts/readthedocs.org/user_builds/build… │ │
│ │      executor = 'generic.local.csh'                                      │ │
│ │     file_name = 'environment'                                            │ │
│ │          name = 'tcsh_env_declaration'                                   │ │
│ │        recipe = {                                                        │ │
│ │                 │   'executor': 'generic.local.csh',                     │ │
│ │                 │   'type': 'script',                                    │ │
│ │                 │   'description': 'tcsh shell example to declare        │ │
│ │                 environment variables',                                  │ │
│ │                 │   'shell': '/bin/tcsh',                                │ │
│ │                 │   'tags': ['tutorials'],                               │ │
│ │                 │   'env': {'path': '/usr/local/bin:$PATH'},             │ │
│ │                 │   'run': 'echo $path'                                  │ │
│ │                 }                                                        │ │
│ │          self = tcsh_env_declaration/c23c64e6                            │ │
│ │       testdir = '/home/docs/checkouts/readthedocs.org/user_builds/build… │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/buildsystem/base.py:125 in shell_detection                        │
│                                                                              │
│    122 │   │   # The default shell will be bash                              │
│    123 │   │   self.default_shell = Shell()                                  │
│    124 │   │                                                                 │
│ ❱  125 │   │   self.shell = Shell(self.recipe.get("shell", "bash"))          │
│    126 │   │                                                                 │
│    127 │   │   # set shebang to value defined in Buildspec, if not defined t │
│    128 │   │   self.shebang = (                                              │
│                                                                              │
│ ╭─────────────── locals ───────────────╮                                     │
│ │ self = tcsh_env_declaration/c23c64e6 │                                     │
│ ╰──────────────────────────────────────╯                                     │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/utils/shell.py:155 in __init__                                    │
│                                                                              │
│   152 │   │   # if input shell is not in list of valid shells we raise error │
│   153 │   │   if self.name not in self.valid_shells:                         │
│   154 │   │   │   raise BuildTestError(                                      │
│ ❱ 155 │   │   │   │   f"Invalid shell: {self.name} select from one of the fo │
│   156 │   │   │   )                                                          │
│   157 │   │                                                                  │
│   158 │   │   self._opts = " ".join(shell.split()[1:])                       │
│                                                                              │
│ ╭─────────────── locals ───────────────╮                                     │
│ │  self = [buildtest.shell][/bin/tcsh] │                                     │
│ │ shell = '/bin/tcsh'                  │                                     │
│ ╰──────────────────────────────────────╯                                     │
╰──────────────────────────────────────────────────────────────────────────────╯
BuildTestError: "Invalid shell: /bin/tcsh select from one of the following 
shells: ['/bin/sh', '/bin/bash', '/usr/bin/bash', '/bin/rbash', 
'/usr/bin/rbash', '/bin/dash', '/usr/bin/dash', '/bin/csh', '/usr/bin/csh', 
'/bin/zsh', '/usr/bin/zsh', '/home/docs/checkouts/readthedocs.org/user_builds/bu
ildtest/envs/v0.12.0/bin/python', '/home/docs/.asdf/shims/python', '/home/docs/c
heckouts/readthedocs.org/user_builds/buildtest/envs/v0.12.0/bin/python3', 
'/home/docs/.asdf/shims/python3', '/usr/bin/python3', '/bin/python3', 'bash', 
'csh', 'tcsh', 'sh', 'zsh', 'python', 'python3']"

Discover Buildspecs

Now, let’s discuss how buildtest discovers buildspecs since there are several ways to build buildspecs.

The buildspec search resolution is described as follows:

  • If file or directory specified by -b option doesn’t exist we exit immediately.

  • If buildspec path is a directory, traverse directory recursively to find all .yml extensions

  • If buildspec path is a file, check if file extension is not .yml, exit immediately

  • If user specifies --tags or --executor we search in buildspec cache to discover buildspecs.

Shown below is a diagram on how buildtest discovers buildspecs. The user can build buildspecs by --buildspec, –tags, or –executor which will discover the buildspecs. You can exclude buildspecs using --exclude option which is processed after discovering buildspecs. The excluded buildspecs are removed from list if found and final list of buildspecs is processed.

../_images/DiscoverBuildspecs.jpg

Configure Build Stages

We can control behavior of buildtest build command to stop at certain phase using --stage option. The –stage option accepts parse or build, which will instruct buildtest to stop at parse or build phase of the pipeline.

Buildtest will validate all the buildspecs in the parse stage, so you can instruct buildtest to stop at parse stage via --stage=parse. This can be useful when debugging buildspecs that are invalid. In this example below, we instruct buildtest to stop after parse stage.

$ buildtest build -b tutorials/vars.yml --stage=parse
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:15                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -b tutorials/vars.yml --stage=parse │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  1
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 1
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/vars.yml: VALID
Total builder objects created: 1


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ variables_bash/06 │ generic.local.bas │ Declare shell    │ /home/docs/checko │
│ aa7a08            │ h                 │ variables in     │ uts/readthedocs.o │
│                   │                   │ bash             │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/vars.yml        │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /bin/buildtest:16 in <module>                                                │
│                                                                              │
│   13                                                                         │
│   14 import buildtest.main                                                   │
│   15                                                                         │
│ ❱ 16 buildtest.main.main()                                                   │
│   17                                                                         │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ __annotations__ = {}                                                     │ │
│ │    __builtins__ = <module 'builtins' (built-in)>                         │ │
│ │      __cached__ = None                                                   │ │
│ │         __doc__ = None                                                   │ │
│ │        __file__ = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │      __loader__ = <_frozen_importlib_external.SourceFileLoader object at │ │
│ │                   0x7febe965a110>                                        │ │
│ │        __name__ = '__main__'                                             │ │
│ │     __package__ = None                                                   │ │
│ │        __spec__ = None                                                   │ │
│ │       buildtest = <module 'buildtest' from                               │ │
│ │                   '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │  buildtest_file = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │              os = <module 'os' from                                      │ │
│ │                   '/home/docs/.asdf/installs/python/3.7.12/lib/python3.… │ │
│ │          prefix = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │             sys = <module 'sys' (built-in)>                              │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/main.py:124 in main                                               │
│                                                                              │
│   121 │   │   │   )                                                          │
│   122 │   │   │   cmd.build()                                                │
│   123 │   │                                                                  │
│ ❱ 124 │   │   build_history_dir = cmd.get_build_history_dir()                │
│   125 │   │   shutil.move(fname, os.path.join(build_history_dir, "output.txt │
│   126 │                                                                      │
│   127 │   elif args.subcommands in ["edit", "et"]:                           │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │               args = Namespace(account=None,                             │ │
│ │                      buildspec=['tutorials/vars.yml'], configfile=None,  │ │
│ │                      debug=False, disable_executor_check=True,           │ │
│ │                      exclude=None, executor=None, filter=None,           │ │
│ │                      helpfilter=False, keep_stage_dir=False,             │ │
│ │                      max_pend_time=None, no_color=False,                 │ │
│ │                      poll_interval=None, rebuild=None, report=None,      │ │
│ │                      retry=1, stage='parse', subcommands='build',        │ │
│ │                      tags=None, testdir=None)                            │ │
│ │                cmd = <buildtest.cli.build.BuildTest object at            │ │
│ │                      0x7febe7b04090>                                     │ │
│ │        config_file = None                                                │ │
│ │      configuration = <buildtest.config.SiteConfiguration object at       │ │
│ │                      0x7febe7ae7510>                                     │ │
│ │              fname = '/home/docs/checkouts/readthedocs.org/user_builds/… │ │
│ │             logger = <Logger buildtest (DEBUG)>                          │ │
│ │           no_color = False                                               │ │
│ │             parser = ArgumentParser(prog='buildtest', usage='%(prog)s    │ │
│ │                      [options] [COMMANDS]', description='buildtest is a  │ │
│ │                      HPC testing framework for building and running      │ │
│ │                      tests.', formatter_class=<class                     │ │
│ │                      'argparse.RawDescriptionHelpFormatter'>,            │ │
│ │                      conflict_handler='error', add_help=True)            │ │
│ │             system = <buildtest.system.BuildTestSystem object at         │ │
│ │                      0x7febe7ae79d0>                                     │ │
│ │ validate_executors = True                                                │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/cli/build.py:1098 in get_build_history_dir                        │
│                                                                              │
│   1095 │                                                                     │
│   1096 │   def get_build_history_dir(self):                                  │
│   1097 │   │   """Return root of build history directory"""                  │
│ ❱ 1098 │   │   return self.build_history_dir                                 │
│   1099                                                                       │
│   1100                                                                       │
│   1101 def update_report(valid_builders, report_file):                       │
│                                                                              │
│ ╭──────────────────────────── locals ─────────────────────────────╮          │
│ │ self = <buildtest.cli.build.BuildTest object at 0x7febe7b04090> │          │
│ ╰─────────────────────────────────────────────────────────────────╯          │
╰──────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'BuildTest' object has no attribute 'build_history_dir'

Likewise, if you want to troubleshoot your test script without running them you can use --stage=build which will stop after build phase. This can be used when you are writing buildspec to troubleshoot how test is generated. In this next example, we inform buildtest to stop after build stage.

$ buildtest build -b tutorials/vars.yml --stage=build
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:16                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -b tutorials/vars.yml --stage=build │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  1
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 1
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/vars.yml: VALID
Total builder objects created: 1


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ variables_bash/5b │ generic.local.bas │ Declare shell    │ /home/docs/checko │
│ 9010f7            │ h                 │ variables in     │ uts/readthedocs.o │
│                   │                   │ bash             │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/vars.yml        │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
variables_bash/5b9010f7: Creating test directory: /home/docs/checkouts/readthedo
cs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/vars
/variables_bash/5b9010f7
variables_bash/5b9010f7: Creating the stage directory: /home/docs/checkouts/read
thedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash
/vars/variables_bash/5b9010f7/stage
variables_bash/5b9010f7: Writing build script: /home/docs/checkouts/readthedocs.
org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/vars/va
riables_bash/5b9010f7/variables_bash_build.sh
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /bin/buildtest:16 in <module>                                                │
│                                                                              │
│   13                                                                         │
│   14 import buildtest.main                                                   │
│   15                                                                         │
│ ❱ 16 buildtest.main.main()                                                   │
│   17                                                                         │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ __annotations__ = {}                                                     │ │
│ │    __builtins__ = <module 'builtins' (built-in)>                         │ │
│ │      __cached__ = None                                                   │ │
│ │         __doc__ = None                                                   │ │
│ │        __file__ = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │      __loader__ = <_frozen_importlib_external.SourceFileLoader object at │ │
│ │                   0x7fa81e4aa110>                                        │ │
│ │        __name__ = '__main__'                                             │ │
│ │     __package__ = None                                                   │ │
│ │        __spec__ = None                                                   │ │
│ │       buildtest = <module 'buildtest' from                               │ │
│ │                   '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │  buildtest_file = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │              os = <module 'os' from                                      │ │
│ │                   '/home/docs/.asdf/installs/python/3.7.12/lib/python3.… │ │
│ │          prefix = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │             sys = <module 'sys' (built-in)>                              │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/main.py:124 in main                                               │
│                                                                              │
│   121 │   │   │   )                                                          │
│   122 │   │   │   cmd.build()                                                │
│   123 │   │                                                                  │
│ ❱ 124 │   │   build_history_dir = cmd.get_build_history_dir()                │
│   125 │   │   shutil.move(fname, os.path.join(build_history_dir, "output.txt │
│   126 │                                                                      │
│   127 │   elif args.subcommands in ["edit", "et"]:                           │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │               args = Namespace(account=None,                             │ │
│ │                      buildspec=['tutorials/vars.yml'], configfile=None,  │ │
│ │                      debug=False, disable_executor_check=True,           │ │
│ │                      exclude=None, executor=None, filter=None,           │ │
│ │                      helpfilter=False, keep_stage_dir=False,             │ │
│ │                      max_pend_time=None, no_color=False,                 │ │
│ │                      poll_interval=None, rebuild=None, report=None,      │ │
│ │                      retry=1, stage='build', subcommands='build',        │ │
│ │                      tags=None, testdir=None)                            │ │
│ │                cmd = <buildtest.cli.build.BuildTest object at            │ │
│ │                      0x7fa81c954e10>                                     │ │
│ │        config_file = None                                                │ │
│ │      configuration = <buildtest.config.SiteConfiguration object at       │ │
│ │                      0x7fa81c9366d0>                                     │ │
│ │              fname = '/home/docs/checkouts/readthedocs.org/user_builds/… │ │
│ │             logger = <Logger buildtest (DEBUG)>                          │ │
│ │           no_color = False                                               │ │
│ │             parser = ArgumentParser(prog='buildtest', usage='%(prog)s    │ │
│ │                      [options] [COMMANDS]', description='buildtest is a  │ │
│ │                      HPC testing framework for building and running      │ │
│ │                      tests.', formatter_class=<class                     │ │
│ │                      'argparse.RawDescriptionHelpFormatter'>,            │ │
│ │                      conflict_handler='error', add_help=True)            │ │
│ │             system = <buildtest.system.BuildTestSystem object at         │ │
│ │                      0x7fa81c936a50>                                     │ │
│ │ validate_executors = True                                                │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/cli/build.py:1098 in get_build_history_dir                        │
│                                                                              │
│   1095 │                                                                     │
│   1096 │   def get_build_history_dir(self):                                  │
│   1097 │   │   """Return root of build history directory"""                  │
│ ❱ 1098 │   │   return self.build_history_dir                                 │
│   1099                                                                       │
│   1100                                                                       │
│   1101 def update_report(valid_builders, report_file):                       │
│                                                                              │
│ ╭──────────────────────────── locals ─────────────────────────────╮          │
│ │ self = <buildtest.cli.build.BuildTest object at 0x7fa81c954e10> │          │
│ ╰─────────────────────────────────────────────────────────────────╯          │
╰──────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'BuildTest' object has no attribute 'build_history_dir'

Invalid Buildspecs

buildtest will skip any buildspecs that fail to validate, in that case the test script will not be generated. Here is an example where we have an invalid buildspec.

$ buildtest build -b tutorials/invalid_buildspec_section.yml
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:16                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -b                                  │
│ tutorials/invalid_buildspec_section.yml                                      │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  1
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 0
Invalid Buildspecs: 1
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/invalid_buildspec_section.yml: INVALID

buildtest is unable to create any tests because there are no valid buildspecs. 

Please see logfile: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/buildtest.log

buildtest may skip tests from running if buildspec specifies an invalid executor name since buildtest needs to know this in order to delegate test to Executor class responsible for running the test. Here is an example where test failed to run since we provided invalid executor.

$ buildtest build -b tutorials/invalid_executor.yml
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:17                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -b tutorials/invalid_executor.yml   │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  1
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 0
Invalid Buildspecs: 1
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/invalid_executor.yml: INVALID

buildtest is unable to create any tests because there are no valid buildspecs. 

Please see logfile: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/buildtest.log

Rebuild Tests

buildtest can rebuild tests using the --rebuild option which can be useful if you want to test a particular test multiple times. The rebuild option works across all discovered buildspecs and create a new test instance (unique id) and test directory path. To demonstrate we will build tutorials/python-shell.yml three times using --rebuild=3.

$ buildtest build -b tutorials/python-shell.yml --rebuild=3
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:17                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -b tutorials/python-shell.yml       │
│ --rebuild=3                                                                  │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  1
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 1
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/python-shell.yml: VALID
Total builder objects created: 3


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ circle_area/b9217 │ generic.local.bas │ Calculate circle │ /home/docs/checko │
│ b4a               │ h                 │ of area given a  │ uts/readthedocs.o │
│                   │                   │ radius           │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/python-shell.ym │
│                   │                   │                  │ l                 │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ circle_area/79448 │ generic.local.bas │ Calculate circle │ /home/docs/checko │
│ ff0               │ h                 │ of area given a  │ uts/readthedocs.o │
│                   │                   │ radius           │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/python-shell.ym │
│                   │                   │                  │ l                 │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ circle_area/fada3 │ generic.local.bas │ Calculate circle │ /home/docs/checko │
│ 7fb               │ h                 │ of area given a  │ uts/readthedocs.o │
│                   │                   │ radius           │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/python-shell.ym │
│                   │                   │                  │ l                 │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
circle_area/b9217b4a: Creating test directory: /home/docs/checkouts/readthedocs.
org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-
shell/circle_area/b9217b4a
circle_area/b9217b4a: Creating the stage directory: /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/py
thon-shell/circle_area/b9217b4a/stage
circle_area/b9217b4a: Writing build script: /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-she
ll/circle_area/b9217b4a/circle_area_build.sh
circle_area/79448ff0: Creating test directory: /home/docs/checkouts/readthedocs.
org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-
shell/circle_area/79448ff0
circle_area/79448ff0: Creating the stage directory: /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/py
thon-shell/circle_area/79448ff0/stage
circle_area/79448ff0: Writing build script: /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-she
ll/circle_area/79448ff0/circle_area_build.sh
circle_area/fada37fb: Creating test directory: /home/docs/checkouts/readthedocs.
org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-
shell/circle_area/fada37fb
circle_area/fada37fb: Creating the stage directory: /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/py
thon-shell/circle_area/fada37fb/stage
circle_area/fada37fb: Writing build script: /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-she
ll/circle_area/fada37fb/circle_area_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
______________________________
Launching test: circle_area/b9217b4a
______________________________
Launching test: circle_area/79448ff0
______________________________
Launching test: circle_area/fada37fb
circle_area/b9217b4a: Running Test via command: bash --norc --noprofile -eo 
pipefail circle_area_build.sh
circle_area/79448ff0: Running Test via command: bash --norc --noprofile -eo 
pipefail circle_area_build.sh
circle_area/b9217b4a: Test completed with returncode: 0
circle_area/b9217b4a: Test completed in 0.124436 seconds
circle_area/b9217b4a: Writing output file -  /home/docs/checkouts/readthedocs.or
g/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-sh
ell/circle_area/b9217b4a/circle_area.out
circle_area/b9217b4a: Writing error file - /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-shel
l/circle_area/b9217b4a/circle_area.err
circle_area/fada37fb: Running Test via command: bash --norc --noprofile -eo 
pipefail circle_area_build.sh
circle_area/79448ff0: Test completed with returncode: 0
circle_area/79448ff0: Test completed in 0.133248 seconds
circle_area/79448ff0: Writing output file -  /home/docs/checkouts/readthedocs.or
g/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-sh
ell/circle_area/79448ff0/circle_area.out
circle_area/79448ff0: Writing error file - /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-shel
l/circle_area/79448ff0/circle_area.err
circle_area/fada37fb: Test completed with returncode: 0
circle_area/fada37fb: Test completed in 0.051196 seconds
circle_area/fada37fb: Writing output file -  /home/docs/checkouts/readthedocs.or
g/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-sh
ell/circle_area/fada37fb/circle_area.out
circle_area/fada37fb: Writing error file - /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/python-shel
l/circle_area/fada37fb/circle_area.err
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Builder      ┃ executor     ┃ status ┃ Checks        ┃ ReturnCode ┃ Runtime  ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃              ┃              ┃        ┃ Runtime)      ┃            ┃          ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ circle_area/ │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.133248 │
│ 79448ff0     │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ circle_area/ │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.051196 │
│ fada37fb     │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ circle_area/ │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.124436 │
│ b9217b4a     │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



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


Adding 3 test results to /home/docs/checkouts/readthedocs.org/user_builds/buildt
est/checkouts/v0.12.0/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/logs/buildtest_bsrd17vf.log

The rebuild works with all options including: --buildspec, --exclude, --tags and --executor. buildtest will perform rebuild for all discovered tests, for instance in this next example we will discover all tests by tag name fail and each test is rebuild twice.

$ buildtest build -t fail --rebuild 2
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-15565277-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2021/12/17 15:41:17                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest                                           │
│ buildtest version:  0.12.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/envs/v0.12.0/bin/python                                                   │
│ python version:     3.7.12                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/buildtest/settings/config.yml                           │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/var/tests                                               │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ st/checkouts/v0.12.0/bin/buildtest build -t fail --rebuild 2                 │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
Discovered Buildspecs:  1
Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.… ║
╚══════════════════════════════════════════════════════════════════════════════╝
                             Buildspecs By Tag=fail                             
╔══════════════════════════════════════════════════════════════════════════════╗
║ Buildspecs                                                                   ║
╟──────────────────────────────────────────────────────────────────────────────╢
║  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12… ║
╚══════════════════════════════════════════════════════════════════════════════╝
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Valid Buildspecs: 1
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/tut
orials/pass_returncode.yml: VALID
Total builder objects created: 8


                                Builder Details                                 
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Builder           ┃ Executor          ┃ description      ┃ buildspecs        ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ exit1_fail/9d5267 │ generic.local.bas │ exit 1 by        │ /home/docs/checko │
│ 56                │ h                 │ default is FAIL  │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ exit1_pass/0157b5 │ generic.local.bas │ report exit 1 as │ /home/docs/checko │
│ 1c                │ h                 │ PASS             │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ returncode_list_m │ generic.local.bas │ exit 2 failed    │ /home/docs/checko │
│ ismatch/82c1e7e1  │ h                 │ since it failed  │ uts/readthedocs.o │
│                   │                   │ to match         │ rg/user_builds/bu │
│                   │                   │ returncode 1     │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ returncode_int_ma │ generic.local.bas │ exit 128 matches │ /home/docs/checko │
│ tch/b3732b66      │ h                 │ returncode 128   │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ exit1_fail/9b5c47 │ generic.local.bas │ exit 1 by        │ /home/docs/checko │
│ 03                │ h                 │ default is FAIL  │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ exit1_pass/61e70a │ generic.local.bas │ report exit 1 as │ /home/docs/checko │
│ 38                │ h                 │ PASS             │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ returncode_list_m │ generic.local.bas │ exit 2 failed    │ /home/docs/checko │
│ ismatch/2db6b1ed  │ h                 │ since it failed  │ uts/readthedocs.o │
│                   │                   │ to match         │ rg/user_builds/bu │
│                   │                   │ returncode 1     │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
├───────────────────┼───────────────────┼──────────────────┼───────────────────┤
│ returncode_int_ma │ generic.local.bas │ exit 128 matches │ /home/docs/checko │
│ tch/88380938      │ h                 │ returncode 128   │ uts/readthedocs.o │
│                   │                   │                  │ rg/user_builds/bu │
│                   │                   │                  │ ildtest/checkouts │
│                   │                   │                  │ /v0.12.0/tutorial │
│                   │                   │                  │ s/pass_returncode │
│                   │                   │                  │ .yml              │
└───────────────────┴───────────────────┴──────────────────┴───────────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
exit1_fail/9d526756: Creating test directory: /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_ret
urncode/exit1_fail/9d526756
exit1_fail/9d526756: Creating the stage directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pas
s_returncode/exit1_fail/9d526756/stage
exit1_fail/9d526756: Writing build script: /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_return
code/exit1_fail/9d526756/exit1_fail_build.sh
exit1_pass/0157b51c: Creating test directory: /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_ret
urncode/exit1_pass/0157b51c
exit1_pass/0157b51c: Creating the stage directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pas
s_returncode/exit1_pass/0157b51c/stage
exit1_pass/0157b51c: Writing build script: /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_return
code/exit1_pass/0157b51c/exit1_pass_build.sh
returncode_list_mismatch/82c1e7e1: Creating test directory: /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/pass_returncode/returncode_list_mismatch/82c1e7e1
returncode_list_mismatch/82c1e7e1: Creating the stage directory: /home/docs/chec
kouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.
local.bash/pass_returncode/returncode_list_mismatch/82c1e7e1/stage
returncode_list_mismatch/82c1e7e1: Writing build script: /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/pass_returncode/returncode_list_mismatch/82c1e7e1/returncode_list_mismatch_bu
ild.sh
returncode_int_match/b3732b66: Creating test directory: /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/pass_returncode/returncode_int_match/b3732b66
returncode_int_match/b3732b66: Creating the stage directory: /home/docs/checkout
s/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loca
l.bash/pass_returncode/returncode_int_match/b3732b66/stage
returncode_int_match/b3732b66: Writing build script: /home/docs/checkouts/readth
edocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/p
ass_returncode/returncode_int_match/b3732b66/returncode_int_match_build.sh
exit1_fail/9b5c4703: Creating test directory: /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_ret
urncode/exit1_fail/9b5c4703
exit1_fail/9b5c4703: Creating the stage directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pas
s_returncode/exit1_fail/9b5c4703/stage
exit1_fail/9b5c4703: Writing build script: /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_return
code/exit1_fail/9b5c4703/exit1_fail_build.sh
exit1_pass/61e70a38: Creating test directory: /home/docs/checkouts/readthedocs.o
rg/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_ret
urncode/exit1_pass/61e70a38
exit1_pass/61e70a38: Creating the stage directory: /home/docs/checkouts/readthed
ocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pas
s_returncode/exit1_pass/61e70a38/stage
exit1_pass/61e70a38: Writing build script: /home/docs/checkouts/readthedocs.org/
user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_return
code/exit1_pass/61e70a38/exit1_pass_build.sh
returncode_list_mismatch/2db6b1ed: Creating test directory: /home/docs/checkouts
/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local
.bash/pass_returncode/returncode_list_mismatch/2db6b1ed
returncode_list_mismatch/2db6b1ed: Creating the stage directory: /home/docs/chec
kouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.
local.bash/pass_returncode/returncode_list_mismatch/2db6b1ed/stage
returncode_list_mismatch/2db6b1ed: Writing build script: /home/docs/checkouts/re
adthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.ba
sh/pass_returncode/returncode_list_mismatch/2db6b1ed/returncode_list_mismatch_bu
ild.sh
returncode_int_match/88380938: Creating test directory: /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/pass_returncode/returncode_int_match/88380938
returncode_int_match/88380938: Creating the stage directory: /home/docs/checkout
s/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.loca
l.bash/pass_returncode/returncode_int_match/88380938/stage
returncode_int_match/88380938: Writing build script: /home/docs/checkouts/readth
edocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/p
ass_returncode/returncode_int_match/88380938/returncode_int_match_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
______________________________
Launching test: exit1_fail/9d526756
______________________________
Launching test: exit1_pass/0157b51c
______________________________
Launching test: returncode_list_mismatch/82c1e7e1
______________________________
Launching test: returncode_int_match/b3732b66
______________________________
Launching test: exit1_fail/9b5c4703
______________________________
Launching test: exit1_pass/61e70a38
______________________________
Launching test: returncode_list_mismatch/2db6b1ed
______________________________
Launching test: returncode_int_match/88380938
exit1_fail/9d526756: Running Test via command: bash --norc --noprofile -eo 
pipefail exit1_fail_build.sh
exit1_pass/0157b51c: Running Test via command: bash --norc --noprofile -eo 
pipefail exit1_pass_build.sh
exit1_pass/0157b51c: Test completed with returncode: 1
exit1_fail/9d526756: Test completed with returncode: 1
exit1_pass/0157b51c: Test completed in 0.022118 seconds
exit1_fail/9d526756: Test completed in 0.025931 seconds
exit1_pass/0157b51c: Writing output file -  /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_retur
ncode/exit1_pass/0157b51c/exit1_pass.out
exit1_fail/9d526756: Writing output file -  /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_retur
ncode/exit1_fail/9d526756/exit1_fail.out
exit1_fail/9d526756: Writing error file - /home/docs/checkouts/readthedocs.org/u
ser_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_returnc
ode/exit1_fail/9d526756/exit1_fail.err
exit1_pass/0157b51c: Writing error file - /home/docs/checkouts/readthedocs.org/u
ser_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_returnc
ode/exit1_pass/0157b51c/exit1_pass.err
exit1_pass/0157b51c: Checking returncode - 1 is matched in list [1]
returncode_list_mismatch/82c1e7e1: Running Test via command: bash --norc 
--noprofile -eo pipefail returncode_list_mismatch_build.sh
returncode_int_match/b3732b66: Running Test via command: bash --norc --noprofile
-eo pipefail returncode_int_match_build.sh
returncode_list_mismatch/82c1e7e1: Test completed with returncode: 2
returncode_int_match/b3732b66: Test completed with returncode: 128
returncode_list_mismatch/82c1e7e1: Test completed in 0.024888 seconds
returncode_int_match/b3732b66: Test completed in 0.024058 seconds
returncode_int_match/b3732b66: Writing output file -  /home/docs/checkouts/readt
hedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/
pass_returncode/returncode_int_match/b3732b66/returncode_int_match.out
returncode_list_mismatch/82c1e7e1: Writing output file -  /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/pass_returncode/returncode_list_mismatch/82c1e7e1/returncode_list_mismatch.o
ut
returncode_list_mismatch/82c1e7e1: Writing error file - /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/pass_returncode/returncode_list_mismatch/82c1e7e1/returncode_list_mismatch.err
returncode_int_match/b3732b66: Writing error file - /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pa
ss_returncode/returncode_int_match/b3732b66/returncode_int_match.err
returncode_int_match/b3732b66: Checking returncode - 128 is matched in list 
[128]
returncode_list_mismatch/82c1e7e1: Checking returncode - 2 is matched in list 
[1, 3]
exit1_fail/9b5c4703: Running Test via command: bash --norc --noprofile -eo 
pipefail exit1_fail_build.sh
exit1_pass/61e70a38: Running Test via command: bash --norc --noprofile -eo 
pipefail exit1_pass_build.sh
exit1_fail/9b5c4703: Test completed with returncode: 1
exit1_fail/9b5c4703: Test completed in 0.007704 seconds
exit1_fail/9b5c4703: Writing output file -  /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_retur
ncode/exit1_fail/9b5c4703/exit1_fail.out
exit1_fail/9b5c4703: Writing error file - /home/docs/checkouts/readthedocs.org/u
ser_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_returnc
ode/exit1_fail/9b5c4703/exit1_fail.err
returncode_list_mismatch/2db6b1ed: Running Test via command: bash --norc 
--noprofile -eo pipefail returncode_list_mismatch_build.sh
exit1_pass/61e70a38: Test completed with returncode: 1
exit1_pass/61e70a38: Test completed in 0.022674 seconds
exit1_pass/61e70a38: Writing output file -  /home/docs/checkouts/readthedocs.org
/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_retur
ncode/exit1_pass/61e70a38/exit1_pass.out
exit1_pass/61e70a38: Writing error file - /home/docs/checkouts/readthedocs.org/u
ser_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pass_returnc
ode/exit1_pass/61e70a38/exit1_pass.err
exit1_pass/61e70a38: Checking returncode - 1 is matched in list [1]
returncode_int_match/88380938: Running Test via command: bash --norc --noprofile
-eo pipefail returncode_int_match_build.sh
returncode_list_mismatch/2db6b1ed: Test completed with returncode: 2
returncode_list_mismatch/2db6b1ed: Test completed in 0.024555 seconds
returncode_list_mismatch/2db6b1ed: Writing output file -  /home/docs/checkouts/r
eadthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.b
ash/pass_returncode/returncode_list_mismatch/2db6b1ed/returncode_list_mismatch.o
ut
returncode_list_mismatch/2db6b1ed: Writing error file - /home/docs/checkouts/rea
dthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bas
h/pass_returncode/returncode_list_mismatch/2db6b1ed/returncode_list_mismatch.err
returncode_list_mismatch/2db6b1ed: Checking returncode - 2 is matched in list 
[1, 3]
returncode_int_match/88380938: Test completed with returncode: 128
returncode_int_match/88380938: Test completed in 0.017716 seconds
returncode_int_match/88380938: Writing output file -  /home/docs/checkouts/readt
hedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/
pass_returncode/returncode_int_match/88380938/returncode_int_match.out
returncode_int_match/88380938: Writing error file - /home/docs/checkouts/readthe
docs.org/user_builds/buildtest/checkouts/v0.12.0/var/tests/generic.local.bash/pa
ss_returncode/returncode_int_match/88380938/returncode_int_match.err
returncode_int_match/88380938: Checking returncode - 128 is matched in list 
[128]
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ Builder      ┃ executor     ┃ status ┃ Checks        ┃ ReturnCode ┃ Runtime  ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃              ┃              ┃        ┃ Runtime)      ┃            ┃          ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ exit1_fail/9 │ generic.loc… │ FAIL   │ N/A N/A N/A   │ 1          │ 0.025931 │
│ d526756      │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ exit1_pass/0 │ generic.loc… │ PASS   │ True False    │ 1          │ 0.022118 │
│ 157b51c      │              │        │ False         │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ returncode_l │ generic.loc… │ FAIL   │ False False   │ 2          │ 0.024888 │
│ ist_mismatch │              │        │ False         │            │          │
│ /82c1e7e1    │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ returncode_i │ generic.loc… │ PASS   │ True False    │ 128        │ 0.024058 │
│ nt_match/b37 │              │        │ False         │            │          │
│ 32b66        │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ exit1_fail/9 │ generic.loc… │ FAIL   │ N/A N/A N/A   │ 1          │ 0.007704 │
│ b5c4703      │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ exit1_pass/6 │ generic.loc… │ PASS   │ True False    │ 1          │ 0.022674 │
│ 1e70a38      │              │        │ False         │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ returncode_l │ generic.loc… │ FAIL   │ False False   │ 2          │ 0.024555 │
│ ist_mismatch │              │        │ False         │            │          │
│ /2db6b1ed    │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ returncode_i │ generic.loc… │ PASS   │ True False    │ 128        │ 0.017716 │
│ nt_match/883 │              │        │ False         │            │          │
│ 80938        │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



Passed Tests: 4/8 Percentage: 50.000%
Failed Tests: 4/8 Percentage: 50.000%


Adding 8 test results to /home/docs/checkouts/readthedocs.org/user_builds/buildt
est/checkouts/v0.12.0/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0/var/logs/buildtest_tuancgma.log

The rebuild option expects a range between 1-50, the --rebuild=1 is equivalent to running without --rebuild option. We set a max limit for rebuild option to avoid system degredation due to high workload.

If you try to exceed this bound you will get an error such as

$ buildtest build -b tutorials/pass_returncode.yml --rebuild 51
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /bin/buildtest:16 in <module>                                                │
│                                                                              │
│   13                                                                         │
│   14 import buildtest.main                                                   │
│   15                                                                         │
│ ❱ 16 buildtest.main.main()                                                   │
│   17                                                                         │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ __annotations__ = {}                                                     │ │
│ │    __builtins__ = <module 'builtins' (built-in)>                         │ │
│ │      __cached__ = None                                                   │ │
│ │         __doc__ = None                                                   │ │
│ │        __file__ = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │      __loader__ = <_frozen_importlib_external.SourceFileLoader object at │ │
│ │                   0x7f522d31b150>                                        │ │
│ │        __name__ = '__main__'                                             │ │
│ │     __package__ = None                                                   │ │
│ │        __spec__ = None                                                   │ │
│ │       buildtest = <module 'buildtest' from                               │ │
│ │                   '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │  buildtest_file = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │              os = <module 'os' from                                      │ │
│ │                   '/home/docs/.asdf/installs/python/3.7.12/lib/python3.… │ │
│ │          prefix = '/home/docs/checkouts/readthedocs.org/user_builds/bui… │ │
│ │             sys = <module 'sys' (built-in)>                              │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/main.py:120 in main                                               │
│                                                                              │
│   117 │   │   │   │   keep_stage_dir=args.keep_stage_dir,                    │
│   118 │   │   │   │   retry=args.retry,                                      │
│   119 │   │   │   │   account=args.account,                                  │
│ ❱ 120 │   │   │   │   helpfilter=args.helpfilter,                            │
│   121 │   │   │   )                                                          │
│   122 │   │   │   cmd.build()                                                │
│   123                                                                        │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │               args = Namespace(account=None,                             │ │
│ │                      buildspec=['tutorials/pass_returncode.yml'],        │ │
│ │                      configfile=None, debug=False,                       │ │
│ │                      disable_executor_check=True, exclude=None,          │ │
│ │                      executor=None, filter=None, helpfilter=False,       │ │
│ │                      keep_stage_dir=False, max_pend_time=None,           │ │
│ │                      no_color=False, poll_interval=None, rebuild=51,     │ │
│ │                      report=None, retry=1, stage=None,                   │ │
│ │                      subcommands='build', tags=None, testdir=None)       │ │
│ │        config_file = None                                                │ │
│ │      configuration = <buildtest.config.SiteConfiguration object at       │ │
│ │                      0x7f522b7a8d50>                                     │ │
│ │              fname = '/home/docs/checkouts/readthedocs.org/user_builds/… │ │
│ │             logger = <Logger buildtest (DEBUG)>                          │ │
│ │           no_color = False                                               │ │
│ │             parser = ArgumentParser(prog='buildtest', usage='%(prog)s    │ │
│ │                      [options] [COMMANDS]', description='buildtest is a  │ │
│ │                      HPC testing framework for building and running      │ │
│ │                      tests.', formatter_class=<class                     │ │
│ │                      'argparse.RawDescriptionHelpFormatter'>,            │ │
│ │                      conflict_handler='error', add_help=True)            │ │
│ │             system = <buildtest.system.BuildTestSystem object at         │ │
│ │                      0x7f522b7a8990>                                     │ │
│ │ validate_executors = True                                                │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│                                                                              │
│ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/v0.12.0 │
│ /buildtest/cli/build.py:533 in __init__                                      │
│                                                                              │
│    530 │   │   │                                                             │
│    531 │   │   │   if rebuild > 50:                                          │
│    532 │   │   │   │   raise BuildTestError(                                 │
│ ❱  533 │   │   │   │   │   f"--rebuild {rebuild} exceeds maximum rebuild lim │
│    534 │   │   │   │   )                                                     │
│    535 │   │                                                                 │
│    536 │   │   self.keep_stage_dir = keep_stage_dir                          │
│                                                                              │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │            account = None                                                │ │
│ │         buildspecs = ['tutorials/pass_returncode.yml']                   │ │
│ │   buildtest_system = <buildtest.system.BuildTestSystem object at         │ │
│ │                      0x7f522b7a8990>                                     │ │
│ │      configuration = <buildtest.config.SiteConfiguration object at       │ │
│ │                      0x7f522b7a8d50>                                     │ │
│ │ exclude_buildspecs = None                                                │ │
│ │          executors = None                                                │ │
│ │  filter_buildspecs = None                                                │ │
│ │         helpfilter = False                                               │ │
│ │     keep_stage_dir = False                                               │ │
│ │      max_pend_time = None                                                │ │
│ │      poll_interval = None                                                │ │
│ │            rebuild = 51                                                  │ │
│ │        report_file = None                                                │ │
│ │              retry = 1                                                   │ │
│ │               self = <buildtest.cli.build.BuildTest object at            │ │
│ │                      0x7f522b7c6150>                                     │ │
│ │              stage = None                                                │ │
│ │               tags = None                                                │ │
│ │            testdir = None                                                │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────╯
BuildTestError: '--rebuild 51 exceeds maximum rebuild limit of 50'

Use Alternate Configuration file

If you want to use an alternate configuration file when building test you can use buildtest -c <config> build. buildtest will prefer configuration file on command line over the user configuration ($HOME/.buildtest/config.yml). For more details see Which configuration file does buildtest read?.

Keeping Stage Directory

buildtest will create setup the test environment in the stage directory where test will be executed. Once test is complete, buildtest will remove the stage directory. If you want to preserve the stage directory you can use buildtest build --keep-stage-dir, this is only useful if you want to run the test manually

Specify Project Account for batch jobs

For batch jobs you typically require one to specify a project account in order to charge jobs depending on your scheduler you can use buildtest build --account option and specify an account name. The command line argument --account will override configuration setting. For more details see Specifying Project Account