cli: make --plugin-path and --omit-{system,home}-plugin-path global opts
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 16 Aug 2019 03:04:06 +0000 (23:04 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 4 Sep 2019 15:58:22 +0000 (11:58 -0400)
commitd36258d0ce3aabe5f05e7e862b97b2792fa70c96
tree1fda2b373cf377609b95fc5304957eef75ab147e
parent9dfe185c9ca8003ad07f7ab9f97062ebaf128717
cli: make --plugin-path and --omit-{system,home}-plugin-path global opts

This patch makes the `--plugin-path`, `--omit-system-plugin-path`, and
`--omit-home-plugin-path` options global options, in that you must
specify them before the command's name.

For example, this used to work:

    $ babeltrace2 list-plugins --plugin-path=mein-plugins

With this patch it doesn't, as `--plugin-path` must come before the
command name:

    $ babeltrace2 --plugin-path=mein-plugins list-plugins

This change exists because those three options were handled by all five
commands anyway, so there was a lot of code redundancy.

Tests are adapted accordingly. Everything about those three options in
`test_convert_args` is removed as they will never be part of the
`--run-args` output now.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I6169b01c2c3943bc5ba13ff0be68f8f8a1853da2
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1951
Tested-by: jenkins <jenkins@lttng.org>
src/cli/babeltrace2-cfg-cli-args.c
tests/cli/convert/test_auto_source_discovery_grouping
tests/cli/convert/test_auto_source_discovery_log_level
tests/cli/convert/test_auto_source_discovery_params
tests/cli/convert/test_convert_args
tests/plugins/flt.utils.muxer/succeed/test_succeed
tests/plugins/flt.utils.trimmer/test_trimming
This page took 0.026795 seconds and 4 git commands to generate.