cli: do not allow --stream-intersection with --run-args/--run-args-0
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 12 Jul 2017 19:29:49 +0000 (15:29 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 17 Jul 2017 21:09:36 +0000 (17:09 -0400)
Also test this in test_convert_args.

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.in

index 95a807be34e64937eb30ef8d0ba7ec2eba360d2c..4fba2b162a206e02562509f319cff65b6e4d4796 100644 (file)
@@ -4654,6 +4654,11 @@ struct bt_config *bt_config_convert_from_args(int argc, const char *argv[],
         * here.
         */
        if (print_run_args || print_run_args_0) {
+               if (stream_intersection_mode) {
+                       printf_err("Cannot specify --stream-intersection with --run-args or --run-args-0\n");
+                       goto error;
+               }
+
                for (i = 0; i < bt_value_array_size(run_args); i++) {
                        struct bt_value *arg_value =
                                bt_value_array_get(run_args, i);
index 3f38f0a4b87318a724453d956a0892e764b5bdf7..875f10e6f623b4b9514802d17fcdb9ee8c2ba11a 100644 (file)
@@ -70,7 +70,7 @@ comment() {
        echo "### $1 ###"
 }
 
-plan_tests 74
+plan_tests 75
 
 test_bt_convert_run_args 'path leftover' '/path/to/trace' '--component source.ctf.fs --name source-ctf-fs --key path --value /path/to/trace --component sink.text.pretty --name pretty --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:pretty'
 test_bt_convert_run_args 'path leftover + named user source with --params' '/path/to/trace --component ZZ:source.another.source --params salut=yes' '--component ZZ:source.another.source --params salut=yes --component source.ctf.fs --name source-ctf-fs --key path --value /path/to/trace --component sink.text.pretty --name pretty --component filter.utils.muxer --name muxer --component filter.lttng-utils.debug-info --name debug-info --connect ZZ:muxer --connect source-ctf-fs:muxer --connect muxer:debug-info --connect debug-info:pretty'
@@ -147,3 +147,4 @@ test_bt_convert_fails 'implicit source.ctf.lttng-live without URL' '-i lttng-liv
 test_bt_convert_fails 'no source' '-o text'
 test_bt_convert_fails '-o ctf without --output' 'my-trace -o ctf'
 test_bt_convert_fails '-o ctf + --output with implicit sink.text.pretty' 'my-trace -o ctf --output /output/path --no-delta'
+test_bt_convert_fails '--stream-intersection' '/path/to/trace --stream-intersection'
This page took 0.027687 seconds and 4 git commands to generate.