cli: use -o ctf --output /output/path to quickly instantiate sink.ctf.fs
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 9 Jun 2017 17:38:08 +0000 (13:38 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 9 Jun 2017 21:03:27 +0000 (17:03 -0400)
commite7ad156c9e5d4cd56c8528dfa31552ebf7a075b2
treea8fa97d85501d7b1ed7478413ce2279e27bcbfb5
parent3bc8ebda41f0fc9b69b7471e3c27f9185510d553
cli: use -o ctf --output /output/path to quickly instantiate sink.ctf.fs

This should be easier for existing users of Babeltrace 1 which are used
to the --output-format (-o) and --output (-w) options. We had people
previously on the mailing list asking why

    babeltrace my-trace -o ctf --output /output/path

was not working. The answer is that there was no CTF sink at the time,
but this usage is still correct and straightforward.

The code makes sure that, if something implies `-o text`, for example
--names, --fields, or --no-delta, then you cannot use this form because
--output could also apply to the implicit sink.pretty.text component. We
also make sure that --output exists if `-o ctf` exists (--output without
`-o ctf` applies to the implicit `-o text` as mentioned previously).

The run command equivalent of this command:

    babeltrace my-trace -o ctf --output /output/path

as returned by --run-args, is:

    babeltrace run --component source.ctf.fs --name source-ctf-fs
                   --key path --value my-trace --component sink.ctf.fs
                   --name sink-ctf-fs --key path --value /output/path
                   --component filter.utils.muxer --name muxer
                   --component filter.lttng-utils.debug-info
                   --name debug-info --connect source-ctf-fs:muxer
                   --connect muxer:debug-info
                   --connect debug-info:sink-ctf-fs

tests/cli/test_convert_args is updated because the preferred name of the
implicit source.ctf.fs component is changed: it used to be `ctf-fs`,
it's now `source-ctf-fs`, as the preferred implicit sink.ctf.fs
component's name is `sink-ctf-fs`. Also there are a few more tests to
verify the constraint and generated options mentioned in this message.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
cli/babeltrace-cfg-cli-args.c
tests/cli/test_convert_args
This page took 0.035642 seconds and 4 git commands to generate.