$ ./test/test-touchpad --filter-device="synaptics*"
@endcode
-The `--filter-device` argument can be combined with `--list` to show
-which devices will be affected.
+The `--filter-group` argument enables selective running of test groups
+through basic shell-style test group matching. The test groups matched are
+litest-specific test groups, see the output of `--list`. For example:
+
+@code
+$ ./test/test-touchpad --filter-group="touchpad:*hover*"
+@endcode
+
+The `--filter-device` and `--filter-group` arguments can be combined with
+`--list` to show which groups and devices will be affected.
@section test-verbosity Controlling test output
static int verbose = 0;
const char *filter_test = NULL;
const char *filter_device = NULL;
+const char *filter_group = NULL;
struct test {
struct list node;
fnmatch(filter_test, funcname, 0) != 0)
return;
+ if (filter_group &&
+ fnmatch(filter_group, suite_name, 0) != 0)
+ return;
+
suite = get_suite(suite_name);
if (required == LITEST_DISABLE_DEVICE &&
assert(type < LITEST_NO_DEVICE);
+ if (filter_group &&
+ fnmatch(filter_group, name, 0) != 0)
+ return;
+
s = get_suite(name);
for (; *dev; dev++) {
if (filter_device &&
enum {
OPT_FILTER_TEST,
OPT_FILTER_DEVICE,
+ OPT_FILTER_GROUP,
OPT_LIST,
OPT_VERBOSE,
};
static const struct option opts[] = {
{ "filter-test", 1, 0, OPT_FILTER_TEST },
{ "filter-device", 1, 0, OPT_FILTER_DEVICE },
+ { "filter-group", 1, 0, OPT_FILTER_GROUP },
{ "list", 0, 0, OPT_LIST },
{ "verbose", 0, 0, OPT_VERBOSE },
{ 0, 0, 0, 0}
case OPT_FILTER_DEVICE:
filter_device = optarg;
break;
+ case OPT_FILTER_GROUP:
+ filter_group = optarg;
+ break;
case OPT_LIST:
litest_list_tests(&all_tests);
exit(0);