5 xfstestsdb testcase list
Anna edited this page 2023-02-10 15:41:23 -05:00

The xfstestsdb testcase list command prints out the xfstests testcases that have been added to the testcases database table.

This command will print output in color by default when running in interactive mode. The "--color=" option can be used to print output in either light or dark color schemes or to disable color altogether. The default color scheme is "dark", but this can be overridden by setting the XFSTESTSDB_COLORS environment variable. The FORCE_COLOR and NO_COLOR environment variables can be used to force or disable color usage, which can be useful when piping to another command such as less -r

The --device=, --failure, --passed, --runid=, --skipped, --testcase=, and --xunit= options are used to narrow down the entries that are printed out to those that have a matching device, runid, testcase, xunit, or status. These options can be combined to further filter the listed results. The --device, --testcase, and --xunit options take a valid SQLite GLOB pattern.

Using the filtering options is highly recommended to avoid printing out an absurd amount of data

Invocation

$ xfstestsdb testcase list [--color[={light|dark|none}]] [--device <device>] [--failure] [--passed] [--runid <runid>] [--skipped] [--testcase <testcase>] [--xunit <xunit>]

Options

Options Choices Description
--color[=] light, dark, none The color output choice
--device= Show test cases matching the given device pattern
--failure Show failing test cases
--passed Show passing test cases
--runid= Show test cases with the given runid
--skipped Show skipped test cases
--testcase= Show test cases with a name matching the given pattern
--xunit= Show test cases matching the given xunit pattern

Exit

Exit Code Description
0 The results have been successfully printed out

Examples

$ xfstestsdb testcase list --color=none
+-----+-----------+---------+----------+---------+------+
| run | device    | xunit   | testcase | status  | time |
+-----+-----------+---------+----------+---------+------+
|   1 | /dev/vda1 | xunit-1 | test/01  | passed  |  1 s |
|   1 | /dev/vda1 | xunit-1 | test/02  | passed  |  2 s |
|   1 | /dev/vda1 | xunit-2 | test/01  | skipped |  0 s |
|   1 | /dev/vda1 | xunit-2 | test/02  | skipped |  0 s |
|   1 | /dev/vda1 | xunit-3 | test/01  | failed  | 10 s |
|   2 | /dev/vda2 | xunit-1 | test/01  | passed  |  1 s |
|   2 | /dev/vda2 | xunit-1 | test/02  | passed  |  2 s |
|   2 | /dev/vda2 | xunit-2 | test/01  | skipped |  0 s |
|   2 | /dev/vda2 | xunit-2 | test/02  | skipped |  0 s |
|   2 | /dev/vda2 | xunit-3 | test/01  | failed  | 12 s |
+-----+-----------+---------+----------+---------+------+
$ xfstestsdb testcase list --color=none --failed
+-----+-----------+---------+----------+---------+------+
| run | device    | xunit   | testcase | status  | time |
+-----+-----------+---------+----------+---------+------+
|   1 | /dev/vda1 | xunit-3 | test/01  | failed  | 10 s |
|   2 | /dev/vda2 | xunit-3 | test/01  | failed  | 12 s |
+-----+-----------+---------+----------+---------+------+
$ xfstestsdb testcase list --color=none --testcase "test*1"
+-----+-----------+---------+----------+---------+------+
| run | device    | xunit   | testcase | status  | time |
+-----+-----------+---------+----------+---------+------+
|   1 | /dev/vda1 | xunit-1 | test/01  | passed  |  1 s |
|   1 | /dev/vda1 | xunit-2 | test/01  | skipped |  0 s |
|   1 | /dev/vda1 | xunit-3 | test/01  | failed  | 10 s |
|   2 | /dev/vda2 | xunit-1 | test/01  | passed  |  1 s |
|   2 | /dev/vda2 | xunit-2 | test/01  | skipped |  0 s |
|   2 | /dev/vda2 | xunit-3 | test/01  | failed  | 12 s |
+-----+-----------+---------+----------+---------+------+