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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 16 Aug 2019 18:03:20 +0000 (14:03 -0400)
commit02510056f9d34d7cd400f4a2d956012f28ca2c53
tree57c72f74a3b7b5aa426c1ae7327bc5b387158f48
parent3b9d10e2cae274bdc5f9bda6108993ce8696bc8a
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.025238 seconds and 4 git commands to generate.