Additional Features

Accessing build history (buildtest history)

Note

buildtest hy is an alias for buildtest history command.

buildtest keeps track of all builds (buildtest build) that can be retrieved using buildtest history command which can be useful when you want to analyze or troubleshoot past builds. The buildtest history command comes with two subcommands buildtest history list and buildtest history query.

If you want to list all builds you should run buildtest history list which will report a table style format of all builds with corresponding build ID to differentiate each build. Shown below is an example output. The build IDs start at 0 and increment as you run buildtest build command.

$ buildtest history list
┏━━━━┳━━━━━━━━━┳━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┓
┃    ┃         ┃      ┃         ┃        ┃ pass    ┃ fail   ┃ total   ┃ comman ┃
┃ id ┃ hostna… ┃ user ┃ system  ┃ date   ┃ tests   ┃ tests  ┃ tests   ┃ d      ┃
┡━━━━╇━━━━━━━━━╇━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━┩
│ 0  │ build-… │ docs │ generic │ 2022/… │ 1       │ 0      │ 1       │ /home/ │
│    │         │      │         │ 19:19… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ /home/ │
│    │         │      │         │        │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/tut │
│    │         │      │         │        │         │        │         │ orials │
│    │         │      │         │        │         │        │         │ /vars. │
│    │         │      │         │        │         │        │         │ yml    │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 1  │ build-… │ docs │ generic │ 2022/… │ 2       │ 2      │ 4       │ /home/ │
│    │         │      │         │ 19:19… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/te │
│    │         │      │         │        │         │        │         │ st_sta │
│    │         │      │         │        │         │        │         │ tus/pa │
│    │         │      │         │        │         │        │         │ ss_ret │
│    │         │      │         │        │         │        │         │ urncod │
│    │         │      │         │        │         │        │         │ e.yml  │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 2  │ build-… │ docs │ generic │ 2022/… │ 1       │ 1      │ 2       │ /home/ │
│    │         │      │         │ 19:19… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/te │
│    │         │      │         │        │         │        │         │ st_sta │
│    │         │      │         │        │         │        │         │ tus/st │
│    │         │      │         │        │         │        │         │ atus_r │
│    │         │      │         │        │         │        │         │ egex.y │
│    │         │      │         │        │         │        │         │ ml     │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 3  │ build-… │ docs │ generic │ 2022/… │ 2       │ 3      │ 5       │ /home/ │
│    │         │      │         │ 19:19… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/te │
│    │         │      │         │        │         │        │         │ st_sta │
│    │         │      │         │        │         │        │         │ tus/ru │
│    │         │      │         │        │         │        │         │ ntime_ │
│    │         │      │         │        │         │        │         │ status │
│    │         │      │         │        │         │        │         │ _test. │
│    │         │      │         │        │         │        │         │ yml    │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 4  │ build-… │ docs │ generic │ 2022/… │ 2       │ 2      │ 4       │ /home/ │
│    │         │      │         │ 19:19… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/te │
│    │         │      │         │        │         │        │         │ st_sta │
│    │         │      │         │        │         │        │         │ tus/ex │
│    │         │      │         │        │         │        │         │ plicit │
│    │         │      │         │        │         │        │         │ _state │
│    │         │      │         │        │         │        │         │ .yml   │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 5  │ build-… │ docs │ generic │ 2022/… │ 2       │ 0      │ 2       │ /home/ │
│    │         │      │         │ 19:19… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/sh │
│    │         │      │         │        │         │        │         │ ebang. │
│    │         │      │         │        │         │        │         │ yml    │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 6  │ build-… │ docs │ generic │ 2022/… │ 1       │ 0      │ 1       │ /home/ │
│    │         │      │         │ 19:19… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/sk │
│    │         │      │         │        │         │        │         │ ip_tes │
│    │         │      │         │        │         │        │         │ ts.yml │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 7  │ build-… │ docs │ generic │ 2022/… │ 0       │ 1      │ 1       │ /home/ │
│    │         │      │         │ 19:19… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/me │
│    │         │      │         │        │         │        │         │ trics_ │
│    │         │      │         │        │         │        │         │ regex. │
│    │         │      │         │        │         │        │         │ yml    │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 8  │ build-… │ docs │ generic │ 2022/… │ 3       │ 0      │ 3       │ /home/ │
│    │         │      │         │ 19:19… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/jo │
│    │         │      │         │        │         │        │         │ b_depe │
│    │         │      │         │        │         │        │         │ ndency │
│    │         │      │         │        │         │        │         │ /ex1.y │
│    │         │      │         │        │         │        │         │ ml     │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 9  │ build-… │ docs │ generic │ 2022/… │ 3       │ 0      │ 3       │ /home/ │
│    │         │      │         │ 19:19… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/jo │
│    │         │      │         │        │         │        │         │ b_depe │
│    │         │      │         │        │         │        │         │ ndency │
│    │         │      │         │        │         │        │         │ /ex2.y │
│    │         │      │         │        │         │        │         │ ml     │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 10 │ build-… │ docs │ generic │ 2022/… │ 3       │ 1      │ 4       │ /home/ │
│    │         │      │         │ 19:19… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/jo │
│    │         │      │         │        │         │        │         │ b_depe │
│    │         │      │         │        │         │        │         │ ndency │
│    │         │      │         │        │         │        │         │ /ex3.y │
│    │         │      │         │        │         │        │         │ ml     │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 11 │ build-… │ docs │ generic │ 2022/… │ 2       │ 0      │ 2       │ /home/ │
│    │         │      │         │ 19:20… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/jo │
│    │         │      │         │        │         │        │         │ b_depe │
│    │         │      │         │        │         │        │         │ ndency │
│    │         │      │         │        │         │        │         │ /ex4.y │
│    │         │      │         │        │         │        │         │ ml     │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 12 │ build-… │ docs │ generic │ 2022/… │ 1       │ 1      │ 2       │ /home/ │
│    │         │      │         │ 19:20… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/mu │
│    │         │      │         │        │         │        │         │ lti_ex │
│    │         │      │         │        │         │        │         │ ecutor │
│    │         │      │         │        │         │        │         │ s/exec │
│    │         │      │         │        │         │        │         │ utor_r │
│    │         │      │         │        │         │        │         │ egex_s │
│    │         │      │         │        │         │        │         │ cript. │
│    │         │      │         │        │         │        │         │ yml    │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 13 │ build-… │ docs │ generic │ 2022/… │ 1       │ 1      │ 2       │ /home/ │
│    │         │      │         │ 19:20… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/mu │
│    │         │      │         │        │         │        │         │ lti_ex │
│    │         │      │         │        │         │        │         │ ecutor │
│    │         │      │         │        │         │        │         │ s/exec │
│    │         │      │         │        │         │        │         │ utors_ │
│    │         │      │         │        │         │        │         │ var_en │
│    │         │      │         │        │         │        │         │ v_decl │
│    │         │      │         │        │         │        │         │ aratio │
│    │         │      │         │        │         │        │         │ n.yml  │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 14 │ build-… │ docs │ generic │ 2022/… │ 1       │ 1      │ 2       │ /home/ │
│    │         │      │         │ 19:20… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/mu │
│    │         │      │         │        │         │        │         │ lti_ex │
│    │         │      │         │        │         │        │         │ ecutor │
│    │         │      │         │        │         │        │         │ s/exec │
│    │         │      │         │        │         │        │         │ utor_s │
│    │         │      │         │        │         │        │         │ chedul │
│    │         │      │         │        │         │        │         │ er.yml │
├────┼─────────┼──────┼─────────┼────────┼─────────┼────────┼─────────┼────────┤
│ 15 │ build-… │ docs │ generic │ 2022/… │ 1       │ 1      │ 2       │ /home/ │
│    │         │      │         │ 19:20… │         │        │         │ docs/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/rea │
│    │         │      │         │        │         │        │         │ dthedo │
│    │         │      │         │        │         │        │         │ cs.org │
│    │         │      │         │        │         │        │         │ /user_ │
│    │         │      │         │        │         │        │         │ builds │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test/c │
│    │         │      │         │        │         │        │         │ heckou │
│    │         │      │         │        │         │        │         │ ts/dev │
│    │         │      │         │        │         │        │         │ el/bin │
│    │         │      │         │        │         │        │         │ /build │
│    │         │      │         │        │         │        │         │ test   │
│    │         │      │         │        │         │        │         │ build  │
│    │         │      │         │        │         │        │         │ -b     │
│    │         │      │         │        │         │        │         │ tutori │
│    │         │      │         │        │         │        │         │ als/mu │
│    │         │      │         │        │         │        │         │ lti_ex │
│    │         │      │         │        │         │        │         │ ecutor │
│    │         │      │         │        │         │        │         │ s/stat │
│    │         │      │         │        │         │        │         │ us_by_ │
│    │         │      │         │        │         │        │         │ execut │
│    │         │      │         │        │         │        │         │ ors.ym │
│    │         │      │         │        │         │        │         │ l      │
└────┴─────────┴──────┴─────────┴────────┴─────────┴────────┴─────────┴────────┘

The buildtest history query command is particularly useful when you want to inspect a particular build. This command expects a Build Identifier which can be found by inspecting output column id in buildtest history list.

Shown below is an output of build ID 0 which reports relevant detail for the build such as input command, username, hostname, platform, date, etc…

$ buildtest history query 0
{
│   'command': '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/bin/buildtest build -b /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/tutorials/vars.yml',
│   'user': 'docs',
│   'hostname': 'build-17824374-project-280831-buildtest',
│   'platform': 'Linux',
│   'date': '2022/08/17 19:19:30',
│   'buildtest': '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/bin/buildtest',
│   'python': '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/envs/devel/bin/python3',
│   'python_version': '3.7.13',
│   'testdir': '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests',
│   'configuration': '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/buildtest/settings/config.yml',
│   'system': 'generic',
│   'logpath': '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/.history/0/buildtest__f9uxkxe.log',
│   'invalid_buildspecs': [],
│   'buildspecs': {
│   │   'detected': [
│   │   │   '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/tutorials/vars.yml'
│   │   ],
│   │   'included': [
│   │   │   '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/tutorials/vars.yml'
│   │   ],
│   │   'excluded': []
│   },
│   'test_summary': {
│   │   'pass': '1',
│   │   'fail': '0',
│   │   'total': '1',
│   │   'pass_rate': '100.000',
│   │   'fail_rate': '0.000'
│   },
│   'builders': {
│   │   'b3af6e1b-8531-48d0-8176-abbc88cca4cf': {
│   │   │   'name': 'variables_bash',
│   │   │   'buildspec': '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/tutorials/vars.yml',
│   │   │   'tags': ['tutorials'],
│   │   │   'executors': 'generic.local.bash',
│   │   │   'state': 'PASS',
│   │   │   'returncode': 0,
│   │   │   'runtime': 0.010571,
│   │   │   'testpath': '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/vars/variables_bash/b3af6e1b/variables_bash.sh',
│   │   │   'errfile': '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/vars/variables_bash/b3af6e1b/variables_bash.err',
│   │   │   'outfile': '/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/vars/variables_bash/b3af6e1b/variables_bash.out'
│   │   }
│   }
}

If you want to see all available build IDs, you can use the following command. The -t is terse format and --no-header will omit the headers for each column and pipe the output to cut to extract the first column which corresponds to build IDs.

$ buildtest hy list -t --no-header | cut -f 1 -d '|'
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

buildtest has tab complete on buildtest history query which reports a list of build IDs which is another way to see available IDs to query.

$ buildtest history query
0   1   10  11  12  13  14  15  16  17  18  19  2   20  21  22  23  3   4   5   6   7   8   9

If you want to see logfile for build ID 0 you can use --log option to see logfile in an editor as follows:

buildtest history query 0 --log

buildtest will store output of buildtest build command to file if command ran to completion. You can retrieve output of previous builds using the --output option. In example below we show output of build file

$ buildtest history query --output 0
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-17824374-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2022/08/17 19:19:30                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ buildtest version:  0.15.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ python version:     3.7.13                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ Report File:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ buildspec                                                                    ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ║
╚══════════════════════════════════════════════════════════════════════════════╝


Total Discovered Buildspecs:  1
Total Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  1
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Buildtest will parse 1 buildspecs
Valid Buildspecs: 1
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/tutorials/vars.yml: VALID
Total builder objects created: 1
Total compiler builder: 0
Total script builder: 1
Total spack builder: 0
                             Script Builder Details                             
┏━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ builder    ┃ executor   ┃ compiler ┃ nodes ┃ procs ┃ descripti… ┃ buildspecs ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ variables… │ generic.l… │ None     │ None  │ None  │ Declare    │ /home/doc… │
│            │            │          │       │       │ shell      │            │
│            │            │          │       │       │ variables  │            │
│            │            │          │       │       │ in bash    │            │
└────────────┴────────────┴──────────┴───────┴───────┴────────────┴────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
variables_bash/b3af6e1b: Creating test directory: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/vars/variables_bash/b3af6e1b
variables_bash/b3af6e1b: Creating the stage directory: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/vars/variables_bash/b3af6e1b/stage
variables_bash/b3af6e1b: Writing build script: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/vars/variables_bash/b3af6e1b/variables_bash_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
Spawning 1 processes for processing builders
───────────────────────────────── Iteration 1 ──────────────────────────────────
variables_bash/b3af6e1b does not have any dependencies adding test to queue
variables_bash/b3af6e1b: Running Test via command: bash --norc --noprofile -eo pipefail variables_bash_build.sh
variables_bash/b3af6e1b: Test completed in 0.010571 seconds
variables_bash/b3af6e1b: Test completed with returncode: 0
variables_bash/b3af6e1b: Writing output file -  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/vars/variables_bash/b3af6e1b/variables_bash.out
variables_bash/b3af6e1b: Writing error file - /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/vars/variables_bash/b3af6e1b/variables_bash.err
In this iteration we are going to run the following tests: [variables_bash/b3af6e1b]
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃              ┃              ┃        ┃ checks        ┃            ┃          ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃ builder      ┃ executor     ┃ status ┃ Runtime)      ┃ returnCode ┃ runtime  ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ variables_ba │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.010571 │
│ sh/b3af6e1b  │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



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/buildtest/checkouts/devel/var/report.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/logs/buildtest__f9uxkxe.log

Buildtest Info (buildtest info)

The buildtest info command will provide user with general information pertaining to buildtest and its configuration, system details such as python wrapper, python version, machine name, operating system. It will also show the version of black, isort and pyflakes which are used when using buildtest stylecheck command

$ buildtest info
╭───────────────────────────── buildtest details ──────────────────────────────╮
│                                                                              │
│ Buildtest Version:        0.15.0                                             │
│ Buildtest Path:           /home/docs/checkouts/readthedocs.org/user_builds/b │
│ Configuration File:       /home/docs/checkouts/readthedocs.org/user_builds/b │
│ Available Systems:        ['generic']                                        │
│ Active System:            generic                                            │
│ Available Executors:      ['generic.local.bash', 'generic.local.sh', 'generi │
│ Build History Directory:  /home/docs/checkouts/readthedocs.org/user_builds/b │
│ Number of builds:         16                                                 │
│ Buildspec Cache File:     /home/docs/checkouts/readthedocs.org/user_builds/b │
│ Default Report File:      /home/docs/checkouts/readthedocs.org/user_builds/b │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────── system details ───────────────────────────────╮
│                                                                              │
│ Python Path:         /home/docs/checkouts/readthedocs.org/user_builds/buildt │
│ Python Version:      3.7.13                                                  │
│ Processor:           x86_64                                                  │
│ Host:                build-17824374-project-280831-buildtest                 │
│ Machine:             x86_64                                                  │
│ Operating System:    ubuntu                                                  │
│ Module System:       None                                                    │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
black: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/envs/devel/bin/black
black version: black, 22.6.0 (compiled: yes)
Python (CPython) 3.7.13

pyflakes: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/envs/devel/bin/pyflakes
pyflakes version: 2.5.0 Python 3.7.13 on Linux

isort: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/envs/devel/bin/isort
                 _                 _
                 (_) ___  ___  _ __| |_
                 | |/ _/ / _ \/ '__  _/
                 | |\__ \/\_\/| |  | |_
                 |_|\___/\___/\_/   \_/
       isort your imports, so you don't have to.
                     VERSION 5.10.1

Accessing buildtest documentation

We provide two command line options to access main documentation and schema docs. This will open a browser on your machine.

To access buildtest docs you can run:

buildtest docs

To access schema docs you can run:

buildtest schemadocs

Disabling Colored Output

buildtest will display output in color format using the rich.Console class. You can disable colored output via buildtest --no-color argument or set this persistent via environment variable BUILDTEST_COLOR=False.

CDASH Integration (buildtest cdash)

The buildtest cdash command is responsible for uploading tests to CDASH server. You will need to specify CDASH Configuration in your configuration file. Shown below is the command usage.

$ buildtest cdash --help
usage: buildtest [options] [COMMANDS] cdash [-h]  ...

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

subcommands:
  buildtest CDASH integeration

  
    view      Open CDASH project in webbrowser
    upload    Upload Test to CDASH server

The buildtest cdash upload command is responsible for uploading all tests in report.json into CDASH. You must specify a buildname when using buildtest cdash upload in this example we will specify a buildname called tutorials:

$ buildtest cdash upload tutorials
Reading configuration file:  /Users/siddiq90/Documents/GitHubDesktop/buildtest/buildtest/settings/config.yml
Reading report file:  /Users/siddiq90/.buildtest/report.json
build name:  tutorials
site:  generic
stamp:  20210428-1512-Experimental
MD5SUM: d7651cb3fbdd19298b0188c441704c3a
PUT STATUS: 200
You can view the results at: https://my.cdash.org//viewTest.php?buildid=2004360

We can see the output of these tests in CDASH if we go to url https://my.cdash.org//viewTest.php?buildid=2004360

_images/CDASH.png

By default buildtest will read the report file in your $HOME/.buildtest/report.json, we can specify an alternate report file. First let’s see the available help options for buildtest cdash upload.

$ buildtest cdash upload --help
usage: buildtest [options] [COMMANDS] cdash upload [-h] [--site SITE] [-o]
                                                   buildname

positional arguments:
  buildname    Specify Build Name reported in CDASH

optional arguments:
  -h, --help   show this help message and exit
  --site SITE  Specify site name reported in CDASH
  -o, --open   Open CDASH report in browser

We can pass an alternate report file using -r option when uploading tests to CDASH. This can be useful if you want to map test results to different buildnames in CDASH perhaps running a different subset of tests via buildtest build --tags and upload the test results with different buildname assuming you have different paths to report file.

Let’s say we want to build all python tests using tags and store them in a report file which we want to push to CDASH with buildgroup name python we can do that as follows

$ buildtest -r $BUILDTEST_ROOT/python.json build --tags python
╭───────────────────────────── buildtest summary ──────────────────────────────╮
│                                                                              │
│ User:               docs                                                     │
│ Hostname:           build-17824374-project-280831-buildtest                  │
│ Platform:           Linux                                                    │
│ Current Time:       2022/08/17 19:20:16                                      │
│ buildtest path:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ buildtest version:  0.15.0                                                   │
│ python path:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ python version:     3.7.13                                                   │
│ Configuration File: /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ Test Directory:     /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ Report File:        /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│ Command:            /home/docs/checkouts/readthedocs.org/user_builds/buildte │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
───────────────────────────  Discovering Buildspecs ────────────────────────────
                             Discovered buildspecs                              
╔══════════════════════════════════════════════════════════════════════════════╗
║ buildspec                                                                    ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ║
╚══════════════════════════════════════════════════════════════════════════════╝
                            Buildspecs By Tag=python                            
╔══════════════════════════════════════════════════════════════════════════════╗
║ buildspec                                                                    ║
╟──────────────────────────────────────────────────────────────────────────────╢
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ║
║ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ║
╚══════════════════════════════════════════════════════════════════════════════╝


Total Discovered Buildspecs:  2
Total Excluded Buildspecs:  0
Detected Buildspecs after exclusion:  2
────────────────────────────── Parsing Buildspecs ──────────────────────────────
Buildtest will parse 2 buildspecs
Valid Buildspecs: 2
Invalid Buildspecs: 0
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/tutorials/python-shell.yml: VALID
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/tutorials/python-hello.yml: VALID
Total builder objects created: 2
Total compiler builder: 0
Total script builder: 2
Total spack builder: 0
                             Script Builder Details                             
┏━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ builder    ┃ executor   ┃ compiler ┃ nodes ┃ procs ┃ descripti… ┃ buildspecs ┃
┡━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ circle_ar… │ generic.l… │ None     │ None  │ None  │ Calculate  │ /home/doc… │
│            │            │          │       │       │ circle of  │            │
│            │            │          │       │       │ area given │            │
│            │            │          │       │       │ a radius   │            │
├────────────┼────────────┼──────────┼───────┼───────┼────────────┼────────────┤
│ python_he… │ generic.l… │ None     │ None  │ None  │ Hello      │ /home/doc… │
│            │            │          │       │       │ World      │            │
│            │            │          │       │       │ python     │            │
└────────────┴────────────┴──────────┴───────┴───────┴────────────┴────────────┘
──────────────────────────────── Building Test ─────────────────────────────────
circle_area/bb888538: Creating test directory: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/python-shell/circle_area/bb888538
circle_area/bb888538: Creating the stage directory: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/python-shell/circle_area/bb888538/stage
circle_area/bb888538: Writing build script: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/python-shell/circle_area/bb888538/circle_area_build.sh
python_hello/8b44efc7: Creating test directory: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/python-hello/python_hello/8b44efc7
python_hello/8b44efc7: Creating the stage directory: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/python-hello/python_hello/8b44efc7/stage
python_hello/8b44efc7: Writing build script: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/python-hello/python_hello/8b44efc7/python_hello_build.sh
──────────────────────────────── Running Tests ─────────────────────────────────
Spawning 1 processes for processing builders
───────────────────────────────── Iteration 1 ──────────────────────────────────
circle_area/bb888538 does not have any dependencies adding test to queue
python_hello/8b44efc7 does not have any dependencies adding test to queue
circle_area/bb888538: Running Test via command: bash --norc --noprofile -eo pipefail circle_area_build.sh
circle_area/bb888538: Test completed in 0.030905 seconds
circle_area/bb888538: Test completed with returncode: 0
circle_area/bb888538: Writing output file -  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/python-shell/circle_area/bb888538/circle_area.out
circle_area/bb888538: Writing error file - /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/python-shell/circle_area/bb888538/circle_area.err
python_hello/8b44efc7: Running Test via command: bash --norc --noprofile -eo pipefail python_hello_build.sh
python_hello/8b44efc7: Test completed in 0.030526 seconds
python_hello/8b44efc7: Test completed with returncode: 0
python_hello/8b44efc7: Writing output file -  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/python-hello/python_hello/8b44efc7/python_hello.out
python_hello/8b44efc7: Writing error file - /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/python-hello/python_hello/8b44efc7/python_hello.err
In this iteration we are going to run the following tests: [circle_area/bb888538, python_hello/8b44efc7]
                                  Test Summary                                  
┏━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓
┃              ┃              ┃        ┃ checks        ┃            ┃          ┃
┃              ┃              ┃        ┃ (ReturnCode,  ┃            ┃          ┃
┃              ┃              ┃        ┃ Regex,        ┃            ┃          ┃
┃ builder      ┃ executor     ┃ status ┃ Runtime)      ┃ returnCode ┃ runtime  ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩
│ circle_area/ │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.030905 │
│ bb888538     │              │        │               │            │          │
├──────────────┼──────────────┼────────┼───────────────┼────────────┼──────────┤
│ python_hello │ generic.loc… │ PASS   │ N/A N/A N/A   │ 0          │ 0.030526 │
│ /8b44efc7    │              │        │               │            │          │
└──────────────┴──────────────┴────────┴───────────────┴────────────┴──────────┘



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/buildtest/checkouts/devel/python.json
Writing Logfile to: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/logs/buildtest_jr37bbm_.log

Next we upload the tests using the -r option to specify the report file

$ buildtest -r $BUILDTEST_ROOT/python.json cdash upload python
Reading report file:  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/python.json
Uploading 2 tests
Build Name:  python
site:  generic
MD5SUM: efc48450b1d20451e70a374b392b1404
You can view the results at: https://my.cdash.org//viewTest.php?buildid=2204584

The buildtest cdash view command can be used to open CDASH project in a web browser using the command line. This feature assumes you have set the CDASH setting in your configuration file.

Cleaning buildtest files (buildtest clean)

The buildtest clean command can be used to remove files generated by buildtest such as test files, report files, buildspec cache, and history files. You will be prompted for response to clean up files for confirmation. If you want to avoid user response you can use buildtest clean -y to accept confirmation for all prompts and buildtest will remove the files.

$ buildtest clean
Remove Test Directory /Users/siddiq90/Documents/GitHubDesktop/buildtest/var/tests (y/n) [default: y]
Remove Report File /Users/siddiq90/Documents/GitHubDesktop/buildtest/var/report.json (y/n) [default: y]
Remove History Directory /Users/siddiq90/Documents/GitHubDesktop/buildtest/var/.history (y/n) [default: y]
Remove Buildspec Cache /Users/siddiq90/Documents/GitHubDesktop/buildtest/var/buildspecs/cache.json (y/n) [default: y]
======> Remove Test Directory
======> Removing Report File
======> Removing History Directory
======> Removing buildspec cache

Changing Directories (buildtest cd)

The buildtest cd command can be used to change directory to root of test given a test name. The change will be applied to your shell upon completion of command. Let’s assume we want to change directory to root of test exit1_pass we can do this as follows:

$ buildtest cd exit1_pass
Changing directory to root of test: exit1_pass/8c4b6ac9-e94e-40d9-8d96-7aaa3a5d3723

$ pwd
/Users/siddiq90/Documents/GitHubDesktop/buildtest/var/tests/generic.local.sh/pass_returncode/exit1_pass/8c4b6ac9

In this previous example, buildtest will use the latest run for test exit1_pass and switch directory to root of test.

We can confirm this directory is from the latest run by running the following command. The testroot is a property in the report table that can be fetch via --format field. The --latest option will fetch the latest run for the test.

$ buildtest report --latest --filter name=exit1_pass --format testroot --terse --no-header
/Users/siddiq90/Documents/GitHubDesktop/buildtest/var/tests/generic.local.sh/pass_returncode/exit1_pass/8c4b6ac9

If you switch cd into a particular build you can specify the name followed by backslash and name of test ID. In this example below, we will specify test name kernel_swapusage/1fa and buildtest will attempt to find first record that starts with the test ID and switch directory to root of test.

$ buildtest cd kernel_swapusage/1fa
Changing directory to root of test: kernel_swapusage/1fa21875-b099-41b6-8bc7-30e0d2dcc13b

$ pwd
/Users/siddiq90/Documents/GitHubDesktop/buildtest/var/tests/generic.local.bash/kernel_state/kernel_swapusage/1fa21875

Get Path for Test (buildtest path)

The buildtest path command is used to display path attributes for a test that is available in the test report. Shown below are available options for buildtest path

$ buildtest path -h
usage: buildtest [options] [COMMANDS] path [-h] [-be | -t | -o | -e | -b | -s]
                                           name

positional arguments:
  name               Name of test

optional arguments:
  -h, --help         show this help message and exit
  -be, --buildenv    Show path to build environment
  -t, --testpath     Show path to test script
  -o, --outfile      Show path to output file
  -e, --errfile      Show path to error file
  -b, --buildscript  Show path to build script
  -s, --stagedir     Show path to stage directory

If you want to fetch the last run for any given test you can specify the name of the test as follows: buildtest path <name>. We can specify a test ID for a test by separating the name and test ID with backslash character (/) as follows: buildtest path <name>/<ID>

If you don’t specify any option you will get root of test. In this example, we will retrieve testroot for test variables_bash which is a property of the test found in the report file.

$ buildtest path variables_bash
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/vars/variables_bash/b3af6e1b

You can get path to testscript via -t option as show below

$ buildtest path -t variables_bash
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/var/tests/generic.local.bash/vars/variables_bash/b3af6e1b/variables_bash.sh

If you want to see content of output file, you can use -o option with cat command as follows:

$ cat $(buildtest path -o variables_bash)
1+2=3
this is a literal string
\'singlequote\'
"doublequote"
current user: docs
number of files: 4
Hello my name is Bob 
 I am 30 years old

In this next example we will query test circle_area with build ID aaa and buildtest will find the first match record that starts with this record and resolves to aaaa622d which is the short ID of test. In the second example we query the latest path for latest run for test circle_area

$ buildtest path circle_area/aaa
/Users/siddiq90/Documents/GitHubDesktop/buildtest/var/tests/generic.local.python/python-shell/circle_area/aaaa622d

$ buildtest path circle_area
/Users/siddiq90/Documents/GitHubDesktop/buildtest/var/tests/generic.local.python/python-shell/circle_area/fc221b84

We have setup mutual exclusion to avoid user from passing two option at same time. If you do run into this situation you will get the following error.

$ buildtest path -o -e variables_bash
usage: buildtest [options] [COMMANDS] path [-h] [-be | -t | -o | -e | -b | -s]
                                           name
buildtest [options] [COMMANDS] path: error: argument -e/--errfile: not allowed with argument -o/--outfile

If you specify an invalid test name or buildtest can’t find the test id, then buildtest will print list of available test names with IDs.

Test Statistics (buildtest stats)

The buildtest stats command can be used to get statistics for a particular test. The input argument is a positional argument which is name of test found in the report file. The output will show some useful details such as First and Last Run, show fastest and slowest runtime including mean and variance. Shown below is the test statistics for exit_fail.

$ buildtest stats python_hello
Total Test Runs:  3
First Run: 2022/06/13 15:29:11
Last Run: 2022/06/13 15:29:21
Fastest Runtime:  0.132854
Slowest Runtime:  0.161916
Mean Runtime 0.144621
Variance Runtime 0.000234
                                                                              Report File: /Users/siddiq90/Documents/GitHubDesktop/buildtest/var/report.json
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ name                                 ┃ state             ┃ returncode                      ┃ starttime                                              ┃ endtime                                                ┃ runtime                  ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ python_hello                         │ PASS              │ 0                               │ 2022/06/13 15:29:11                                    │ 2022/06/13 15:29:11                                    │ 0.132854                 │
├──────────────────────────────────────┼───────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────┼──────────────────────────┤
│ python_hello                         │ PASS              │ 0                               │ 2022/06/13 15:29:12                                    │ 2022/06/13 15:29:12                                    │ 0.139094                 │
├──────────────────────────────────────┼───────────────────┼─────────────────────────────────┼────────────────────────────────────────────────────────┼────────────────────────────────────────────────────────┼──────────────────────────┤
│ python_hello                         │ PASS              │ 0                               │ 2022/06/13 15:29:21                                    │ 2022/06/13 15:29:21                                    │ 0.161916                 │
└──────────────────────────────────────┴───────────────────┴─────────────────────────────────┴────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────┴──────────────────────────┘

Buildtest Debug Report (buildtest debugreport)

The buildtest debugreport command is used for debugging especially when you want to raise an issue to buildtest project. This command will provide system details along with configuration file and output of log file during the report.

$ buildtest debugreport
Host: build-17824374-project-280831-buildtest
OS: ubuntu
Python:  /home/docs/checkouts/readthedocs.org/user_builds/buildtest/envs/devel/bin/python3
Python Version:  3.7.13
BUILDTEST_VERSION:  0.15.0
─ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ─
   1 system:
   2   generic:
   3     # specify list of hostnames where buildtest can run for given system record
   4     hostnames: [".*"]
   5 
   6     # system description
   7     description: Generic System
   8     # specify module system used at your site (environment-modules, lmod)
   9     moduletool: N/A
  10 
  11     # specify test timeout duration in number of seconds
  12     # timeout: 60
  13 
  14     # pool size for parallel processing using multiprocessing.Pool. Pool Size must be 1 or higher. The pool size is calculated as follows: poolsize = min(poolsize, os.cpu_count())
  15     poolsize: 1
  16 
  17     executors:
  18       # define local executors for running jobs locally
  19       local:
  20         bash:
  21           description: submit jobs on local machine using bash shell
  22           shell: bash
  23         sh:
  24           description: submit jobs on local machine using sh shell
  25           shell: sh
  26         csh:
  27           description: submit jobs on local machine using csh shell
  28           shell: csh
  29         zsh:
  30           description: submit jobs on local machine using zsh shell
  31           shell: zsh
  32     # compiler block
  33     compilers:
  34       # regular expression to search for compilers based on module pattern. Used with 'buildtest config compilers find' to generate compiler instance
  35       # find:
  36       #  gcc: "^(gcc)"
  37       #  intel: "^(intel)"
  38       #  cray: "^(craype)"
  39       #  pgi: "^(pgi)"
  40       #  cuda: ^(cuda)"
  41       #  clang: "^(clang)"
  42 
  43       # declare compiler instance which can be site-specific. You can let 'buildtest config compilers find' generate compiler section
  44       compiler:
  45         gcc:
  46           builtin_gcc:
  47             cc: gcc
  48             fc: gfortran
  49             cxx: g++
  50 
  51     # location of log directory
  52     # logdir: /tmp/
  53 
  54     # specify location where buildtest will write tests
  55     # testdir: /tmp
  56 
  57     # specify one or more directory where buildtest should load buildspecs
  58     # buildspec_roots: []
  59 
  60     cdash:
  61       url: https://my.cdash.org/
  62       project: buildtest
  63       site: generic
  64       buildname: tutorials
  65 
─ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ─
   1 2022-08-17 19:20:20,951 [system.py:42 - check() ] - [DEBUG] Starting System Compatibility Check
   2 2022-08-17 19:20:20,952 [system.py:67 - check() ] - [DEBUG] Machine: x86_64
   3 2022-08-17 19:20:20,953 [system.py:68 - check() ] - [DEBUG] Host: build-17824374-project-280831-buildtest
   4 2022-08-17 19:20:20,953 [system.py:69 - check() ] - [DEBUG] User: docs
   5 2022-08-17 19:20:20,953 [system.py:70 - check() ] - [DEBUG] Operating System: ubuntu
   6 2022-08-17 19:20:20,953 [system.py:72 - check() ] - [DEBUG] System Kernel: Linux and Kernel Release: 5.15.0-1004-aws
   7 2022-08-17 19:20:20,953 [system.py:74 - check() ] - [DEBUG] Python Path: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/envs/devel/bin/python3
   8 2022-08-17 19:20:20,953 [system.py:75 - check() ] - [DEBUG] Python Version: 3.7.13
   9 2022-08-17 19:20:20,953 [system.py:76 - check() ] - [DEBUG] BUILDTEST_ROOT: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel
  10 2022-08-17 19:20:20,953 [system.py:77 - check() ] - [DEBUG] Path to Buildtest: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/bin/buildtest
  11 2022-08-17 19:20:20,953 [system.py:152 - check_binaries() ] - [DEBUG] We will check the following binaries ['sbatch', 'sacct', 'sacctmgr', 'sinfo', 'scancel'] for existence.
  12 2022-08-17 19:20:20,953 [system.py:156 - check_binaries() ] - [DEBUG] Cannot find sbatch command in $PATH
  13 2022-08-17 19:20:20,953 [system.py:152 - check_binaries() ] - [DEBUG] We will check the following binaries ['bsub', 'bqueues', 'bkill', 'bjobs'] for existence.
  14 2022-08-17 19:20:20,953 [system.py:156 - check_binaries() ] - [DEBUG] Cannot find bsub command in $PATH
  15 2022-08-17 19:20:20,953 [system.py:152 - check_binaries() ] - [DEBUG] We will check the following binaries ['qsub', 'qstat', 'qdel', 'nodelist', 'showres', 'partlist'] for existence.
  16 2022-08-17 19:20:20,953 [system.py:156 - check_binaries() ] - [DEBUG] Cannot find qsub command in $PATH
  17 2022-08-17 19:20:20,953 [system.py:152 - check_binaries() ] - [DEBUG] We will check the following binaries ['qsub', 'qstat', 'qdel', 'qstart', 'qhold', 'qmgr'] for existence.
  18 2022-08-17 19:20:20,953 [system.py:156 - check_binaries() ] - [DEBUG] Cannot find qsub command in $PATH
  19 2022-08-17 19:20:20,953 [system.py:82 - check() ] - [DEBUG] Finished System Compatibility Check
  20 2022-08-17 19:20:20,964 [config.py:129 - validate() ] - [DEBUG] Loading default settings schema: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/buildtest/schemas/settings.schema.json
  21 2022-08-17 19:20:20,965 [utils.py:40 - load_schema() ] - [DEBUG] Successfully loaded schema file: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/buildtest/schemas/settings.schema.json
  22 2022-08-17 19:20:20,965 [config.py:133 - validate() ] - [DEBUG] Validating configuration file with schema: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/buildtest/schemas/settings.schema.json
  23 2022-08-17 19:20:20,971 [config.py:136 - validate() ] - [DEBUG] Validation was successful
  24 2022-08-17 19:20:20,971 [system.py:42 - check() ] - [DEBUG] Starting System Compatibility Check
  25 2022-08-17 19:20:20,971 [system.py:67 - check() ] - [DEBUG] Machine: x86_64
  26 2022-08-17 19:20:20,971 [system.py:68 - check() ] - [DEBUG] Host: build-17824374-project-280831-buildtest
  27 2022-08-17 19:20:20,971 [system.py:69 - check() ] - [DEBUG] User: docs
  28 2022-08-17 19:20:20,971 [system.py:70 - check() ] - [DEBUG] Operating System: ubuntu
  29 2022-08-17 19:20:20,971 [system.py:72 - check() ] - [DEBUG] System Kernel: Linux and Kernel Release: 5.15.0-1004-aws
  30 2022-08-17 19:20:20,971 [system.py:74 - check() ] - [DEBUG] Python Path: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/envs/devel/bin/python3
  31 2022-08-17 19:20:20,971 [system.py:75 - check() ] - [DEBUG] Python Version: 3.7.13
  32 2022-08-17 19:20:20,971 [system.py:76 - check() ] - [DEBUG] BUILDTEST_ROOT: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel
  33 2022-08-17 19:20:20,972 [system.py:77 - check() ] - [DEBUG] Path to Buildtest: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/bin/buildtest
  34 2022-08-17 19:20:20,972 [system.py:152 - check_binaries() ] - [DEBUG] We will check the following binaries ['sbatch', 'sacct', 'sacctmgr', 'sinfo', 'scancel'] for existence.
  35 2022-08-17 19:20:20,972 [system.py:156 - check_binaries() ] - [DEBUG] Cannot find sbatch command in $PATH
  36 2022-08-17 19:20:20,972 [system.py:152 - check_binaries() ] - [DEBUG] We will check the following binaries ['bsub', 'bqueues', 'bkill', 'bjobs'] for existence.
  37 2022-08-17 19:20:20,972 [system.py:156 - check_binaries() ] - [DEBUG] Cannot find bsub command in $PATH
  38 2022-08-17 19:20:20,972 [system.py:152 - check_binaries() ] - [DEBUG] We will check the following binaries ['qsub', 'qstat', 'qdel', 'nodelist', 'showres', 'partlist'] for existence.
  39 2022-08-17 19:20:20,972 [system.py:156 - check_binaries() ] - [DEBUG] Cannot find qsub command in $PATH
  40 2022-08-17 19:20:20,972 [system.py:152 - check_binaries() ] - [DEBUG] We will check the following binaries ['qsub', 'qstat', 'qdel', 'qstart', 'qhold', 'qmgr'] for existence.
  41 2022-08-17 19:20:20,972 [system.py:156 - check_binaries() ] - [DEBUG] Cannot find qsub command in $PATH
  42 2022-08-17 19:20:20,972 [system.py:82 - check() ] - [DEBUG] Finished System Compatibility Check
  43 2022-08-17 19:20:20,972 [main.py:127 -  main() ] - [INFO] [red]Processing buildtest configuration file: /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/buildtest/settings/config.yml
  44

Command Line Interface to buildtest configuration (buildtest config)

Once you have implemented your buildtest configuration, you can query the configuration details using buildtest config command. Shown below is the command usage.

$ buildtest config --help
usage: buildtest [options] [COMMANDS] config [-h]  ...

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

subcommands:
  Query information from buildtest configuration file

  
    compilers
              Search compilers
    edit      Open configuration file in editor
    executors
              Query executors from buildtest configuration
    path      Show path to configuration file
    systems   List all available systems
    validate  Validate buildtest settings file with schema.
    view      View configuration file

Note

buildtest cg is an alias for buildtest config command.

Validate buildtest configuration (buildtest config validate)

First thing you should do once you implement your configuration file is to make sure your configuration is valid with the schema. This can be achieved by running buildtest config validate. When you invoke this command, buildtest will load the configuration and attempt to validate the file with schema settings.schema.json. If validation is successful you will get the following message:

$ buildtest config validate
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/buildtest/settings/config.yml is valid

Note

If you defined a user setting (~/.buildtest/config.yml) buildtest will validate this file instead of default one.

If there is an error during validation, the output from jsonschema.exceptions.ValidationError will be displayed in terminal. For example the error below indicates that moduletool property was expecting one of the values [environment-modules, lmod, N/A] but it received a value of none:

$ buildtest config validate
Traceback (most recent call last):
  File "/Users/siddiq90/Documents/buildtest/bin/buildtest", line 17, in <module>
    buildtest.main.main()
  File "/Users/siddiq90/Documents/buildtest/buildtest/main.py", line 39, in main
    buildtest_configuration = check_settings(settings_file, retrieve_settings=True)
  File "/Users/siddiq90/Documents/buildtest/buildtest/config.py", line 41, in check_settings
    validate(instance=user_schema, schema=config_schema)
  File "/Users/siddiq90/.local/share/virtualenvs/buildtest-1gHVG2Pd/lib/python3.7/site-packages/jsonschema/validators.py", line 934, in validate
    raise error
jsonschema.exceptions.ValidationError: 'none' is not one of ['environment-modules', 'lmod', 'N/A']

Failed validating 'enum' in schema['properties']['moduletool']:
    {'description': 'Specify modules tool used for interacting with '
                    '``module`` command. ',
     'enum': ['environment-modules', 'lmod', 'N/A'],
     'type': 'string'}

On instance['moduletool']:
    'none'

View buildtest configuration (buildtest config view)

If you want to view buildtest configuration you can run buildtest config view which will print content of buildtest configuration.

$ buildtest config view
─ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ─
   1 system:
   2   generic:
   3     # specify list of hostnames where buildtest can run for given system record
   4     hostnames: [".*"]
   5 
   6     # system description
   7     description: Generic System
   8     # specify module system used at your site (environment-modules, lmod)
   9     moduletool: N/A
  10 
  11     # specify test timeout duration in number of seconds
  12     # timeout: 60
  13 
  14     # pool size for parallel processing using multiprocessing.Pool. Pool Size must be 1 or higher. The pool size is calculated as follows: poolsize = min(poolsize, os.cpu_count())
  15     poolsize: 1
  16 
  17     executors:
  18       # define local executors for running jobs locally
  19       local:
  20         bash:
  21           description: submit jobs on local machine using bash shell
  22           shell: bash
  23         sh:
  24           description: submit jobs on local machine using sh shell
  25           shell: sh
  26         csh:
  27           description: submit jobs on local machine using csh shell
  28           shell: csh
  29         zsh:
  30           description: submit jobs on local machine using zsh shell
  31           shell: zsh
  32     # compiler block
  33     compilers:
  34       # regular expression to search for compilers based on module pattern. Used with 'buildtest config compilers find' to generate compiler instance
  35       # find:
  36       #  gcc: "^(gcc)"
  37       #  intel: "^(intel)"
  38       #  cray: "^(craype)"
  39       #  pgi: "^(pgi)"
  40       #  cuda: ^(cuda)"
  41       #  clang: "^(clang)"
  42 
  43       # declare compiler instance which can be site-specific. You can let 'buildtest config compilers find' generate compiler section
  44       compiler:
  45         gcc:
  46           builtin_gcc:
  47             cc: gcc
  48             fc: gfortran
  49             cxx: g++
  50 
  51     # location of log directory
  52     # logdir: /tmp/
  53 
  54     # specify location where buildtest will write tests
  55     # testdir: /tmp
  56 
  57     # specify one or more directory where buildtest should load buildspecs
  58     # buildspec_roots: []
  59 
  60     cdash:
  61       url: https://my.cdash.org/
  62       project: buildtest
  63       site: generic
  64       buildname: tutorials
  65

Check path to buildtest configuration file (buildtest config path)

If you want to check path to buildtest configuration file you can run buildtest config path which will print path of buildtest configuration file.

$ buildtest config path
/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/buildtest/settings/config.yml

Edit buildtest configuration (buildtest config edit)

The buildtest config edit command is used to open buildtest configuration file in your preferred editor. buildtest will use the environment EDITOR to get the preffered editor; however, one can override the environment variable via command line option buildtest --editor.

View Executors (buildtest config executors)

You can use the command buildtest config executors to view executors from buildtest configuration file. Shown below is the command usage

$ buildtest config executors --help
usage: buildtest [options] [COMMANDS] config executors [-h]
                                                       [-j | -y | -d | -i]

optional arguments:
  -h, --help      show this help message and exit
  -j, --json      View executor in JSON format
  -y, --yaml      View executors in YAML format
  -d, --disabled  Show disabled executors
  -i, --invalid   Show invalid executors

You can run buildtest config executors without any options and it will report a list of named executors that you would reference in buildspec using the executor property. If you prefer json or yaml format you can use --json or --yaml option.

$ buildtest config executors
generic.local.bash
generic.local.sh
generic.local.csh
generic.local.zsh

View Registered Systems (buildtest config systems)

Your buildtest configuration may compose of one or more systems since you can define multiple systems in a single configuration file to run buildtest for different HPC clusters. You can use buildtest config systems to report all system details defined in your configuration file. In this example below we should the generic system. If you have multiple entries, you will see one entry per system record.

$ buildtest config systems
System Summary (Configuration=/home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/buildtest/settings/config.yml)
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ system        ┃ description             ┃ moduletool        ┃ hostnames      ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ generic       │ Generic System          │ N/A               │ .*             │
└───────────────┴─────────────────────────┴───────────────────┴────────────────┘

Example Configurations

buildtest provides a few example configurations for configuring buildtest this can be retrieved by running buildtest schema -n settings.schema.json --examples or short option (-e), which will validate each example with schema file settings.schema.json.

$ buildtest schema -n settings.schema.json -e
─ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ─
system:                                                                         
  generic:                                                                      
    hostnames: ['.*']                                                           
    moduletool: lmod                                                            
    poolsize: 1                                                                 
    executors:                                                                  
      defaults:                                                                 
        pollinterval: 10                                                        
        maxpendtime: 45                                                         
      local:                                                                    
        bash:                                                                   
          description: submit jobs via bash shell                               
          shell: bash                                                           
      lsf:                                                                      
        batch:                                                                  
          description: "LSF Executor name 'batch' that submits jobs to 'batch' q
          queue: batch                                                          
          account: developer                                                    
          options: ["-W 20"]                                                    
          before_script: |                                                      
            time                                                                
            echo "commands run before job"                                      
        test:                                                                   
          description: "LSF Executor name 'test' that submits jobs to 'test' que
          launcher: bsub                                                        
          queue: test                                                           
          account: qa                                                           
          options: ["-W 20"]                                                    
    compilers:                                                                  
      compiler:                                                                 
        gcc:                                                                    
          default:                                                              
            cc: /usr/bin/gcc                                                    
            cxx: /usr/bin/g++                                                   
            fc: /usr/bin/gfortran                                               
─ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ─
system:                                                                         
  generic:                                                                      
    hostnames: ['.*']                                                           
    moduletool: lmod                                                            
    poolsize: 1                                                                 
    buildspec_roots:                                                            
      - $HOME/buildtest-cori                                                    
    testdir: /tmp/buildtest                                                     
    executors:                                                                  
      defaults:                                                                 
        pollinterval: 20                                                        
        maxpendtime: 30                                                         
        account: admin                                                          
      local:                                                                    
        bash:                                                                   
          description: submit jobs via bash shell                               
          shell: bash                                                           
      slurm:                                                                    
        normal:                                                                 
          options: ["-C haswell"]                                               
          qos: normal                                                           
          before_script: |                                                      
            time                                                                
            echo "commands run before job"                                      
    compilers:                                                                  
      compiler:                                                                 
        gcc:                                                                    
          default:                                                              
            cc: /usr/bin/gcc                                                    
            cxx: /usr/bin/g++                                                   
            fc: /usr/bin/gfortran                                               
─ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ─
system:                                                                         
  generic:                                                                      
    hostnames: ['.*']                                                           
    moduletool: N/A                                                             
    poolsize: 1                                                                 
    executors:                                                                  
      defaults:                                                                 
         pollinterval: 10                                                       
         maxpendtime: 30                                                        
      local:                                                                    
        bash:                                                                   
          description: submit jobs via bash shell                               
          shell: bash                                                           
      pbs:                                                                      
        workq:                                                                  
          queue: workq                                                          
    compilers:                                                                  
      compiler:                                                                 
        gcc:                                                                    
          default:                                                              
            cc: /usr/bin/gcc                                                    
            cxx: /usr/bin/g++                                                   
            fc: /usr/bin/gfortran                                               
─ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ─
system:                                                                         
  generic:                                                                      
    hostnames: ['.*']                                                           
    moduletool: N/A                                                             
    poolsize: 1                                                                 
    executors:                                                                  
      local:                                                                    
        bash:                                                                   
          description: submit jobs on local machine                             
          shell: bash -v                                                        
      slurm:                                                                    
        haswell:                                                                
          launcher: sbatch                                                      
          options: ["-p haswell", "-t 00:10"]                                   
      lsf:                                                                      
        batch:                                                                  
          launcher: bsub                                                        
          queue: batch                                                          
          options: ["-q batch", "-t 00:10"]                                     
      cobalt:                                                                   
        normal:                                                                 
          launcher: qsub                                                        
          queue: normal                                                         
          options: ["-n 1", "-t 10"]                                            
    compilers:                                                                  
      compiler:                                                                 
        gcc:                                                                    
          default:                                                              
            cc: /usr/bin/gcc                                                    
            cxx: /usr/bin/g++                                                   
            fc: /usr/bin/gfortran                                               
─ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ─
system:                                                                         
  generic:                                                                      
    hostnames: ['.*']                                                           
    #logdir: $BUILDTEST_ROOT/logs                                               
    #testdir: $BUILDTEST_ROOT/tests                                             
    moduletool: N/A                                                             
    poolsize: 1                                                                 
    cdash:                                                                      
      url: https://my.cdash.org                                                 
      project: buildtest                                                        
      site: laptop                                                              
    processor:                                                                  
      numcpus: 8                                                                
      cores: 4                                                                  
      threads_per_core: 2                                                       
      sockets: 1                                                                
      model: "Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz"                         
    executors:                                                                  
      local:                                                                    
        bash:                                                                   
          description: submit jobs on local machine using bash shell            
          shell: bash                                                           
          module:                                                               
            purge: True                                                         
            restore: "Default"                                                  
            load: ["gcc"]                                                       
        sh:                                                                     
          description: submit jobs on local machine using sh shell              
          shell: sh                                                             
          before_script: |                                                      
            date                                                                
            echo "these commands will be run"                                   
        csh:                                                                    
          description: submit jobs on local machine using csh shell             
          shell: csh -x                                                         
        tcsh:                                                                   
          description: submit jobs on local machine using tcsh shell            
          shell: /bin/tcsh                                                      
        zsh:                                                                    
          description: submit jobs on local machine using zsh shell             
          shell: /bin/zsh                                                       
                                                                                
    compilers:                                                                  
      find:                                                                     
        gcc: "^(gcc|GCC|PrgEnv-gnu)"                                            
        intel: "^(intel|Intel|PrgEnv-intel)"                                    
        cray: "^(cray|PrgEnv-cray)"                                             
        clang: "^(clang|Clang)"                                                 
        cuda: "^(cuda|CUDA)"                                                    
        pgi: "^(pgi|PGI|PrgEnv-pgi)"                                            
                                                                                
      compiler:                                                                 
        gcc:                                                                    
          default:                                                              
            cc: /usr/bin/gcc                                                    
            cxx: /usr/bin/g++                                                   
            fc: /usr/bin/gfortran                                               
          gcc@7.2.0:                                                            
            cc: 'cc'                                                            
            cxx: 'cxx'                                                          
            fc: 'fc'                                                            
            module:                                                             
              load:                                                             
              - gcc/7.2.0                                                       
        intel:                                                                  
          intel@2019:                                                           
            cc: 'icc'                                                           
            cxx: 'icpc'                                                         
            fc: 'ifort'                                                         
            module:                                                             
              purge: True                                                       
              load:                                                             
              - gcc/7.2.0                                                       
              - intel/2019                                                      
        cray:                                                                   
          craype@2.6.2:                                                         
            cc: 'cc'                                                            
            cxx: 'CC'                                                           
            fc: 'fc'                                                            
            module:                                                             
              load: [craype/2.6.2]                                              
              swap: [PrgEnv-gnu, PrgEnv-cray]                                   
                                                                                
        clang:                                                                  
          clang@12.0.0:                                                         
            cc: 'clang'                                                         
            cxx: 'clang++'                                                      
            fc: 'None'                                                          
            module:                                                             
              load: [clang/12.0]                                                
        cuda:                                                                   
          cuda@11.0:                                                            
            cc: 'nvcc'                                                          
            cxx: 'nvcc'                                                         
            fc: 'None'                                                          
            module:                                                             
              load: [cuda/11.0]                                                 
        pgi:                                                                    
          pgi@18.0:                                                             
            cc: 'pgcc'                                                          
            cxx: 'pgc++'                                                        
            fc: 'pgfortran'                                                     
            module:                                                             
              load: [pgi/18.0]                                                  
                                                                                
─ /home/docs/checkouts/readthedocs.org/user_builds/buildtest/checkouts/devel/… ─
system:                                                                         
  generic:                                                                      
    hostnames: ['.*']                                                           
    moduletool: lmod                                                            
    poolsize: 1                                                                 
    executors:                                                                  
      defaults:                                                                 
         maxpendtime: 30                                                        
      local:                                                                    
        bash:                                                                   
          description: submit jobs via bash shell                               
          shell: bash                                                           
      cobalt:                                                                   
        knl:                                                                    
          queue: knl                                                            
                                                                                
        haswell:                                                                
          queue: haswell                                                        
                                                                                
    compilers:                                                                  
      compiler:                                                                 
        gcc:                                                                    
          default:                                                              
            cc: /usr/bin/gcc                                                    
            cxx: /usr/bin/g++                                                   
            fc: /usr/bin/gfortran

If you want to retrieve full json schema file for buildtest configuration you can run buildtest schema -n settings.schema.json --json or short option -j.