+
See <<params-fmt,Parameters format>> for the format of 'PARAMS'.
-opt:--path='PATH'::
- Set the nlparam:path initialization parameter of the current
- component to 'PATH' (replace the parameter if it exists).
-+
-You can use this option instead of manually specifying `path="PATH"` in
-a opt:--params option to use your shell's tilde expansion (`~`). Tilde
-expansion requires the tilde to be the first character of the argument,
-which is not possible with `path="PATH"`.
-
-opt:--url='URL'::
- Set the nlparam:url initialization parameter of the current
- component to 'URL' (replace the parameter if it exists).
-
See <<examples,EXAMPLES>> for usage examples.
component's initialization parameters, replace the parameter.
See <<params-fmt,Parameters format>> for the format of 'PARAMS'.
-opt:-P 'PATH', opt:--path='PATH'::
- Set the nlparam:path initialization parameter of the current
- component to 'PATH' (replace the parameter if it exists).
-
-opt:-u 'URL', opt:--url='URL'::
- Set the nlparam:url initialization parameter of the current
- component to 'URL' (replace the parameter if it exists).
-
Legacy options to create implicit components
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OPT_OUTPUT,
OPT_OUTPUT_FORMAT,
OPT_PARAMS,
- OPT_PATH,
OPT_PLUGIN_PATH,
OPT_RESET_BASE_PARAMS,
OPT_RETRY_DURATION,
OPT_RUN_ARGS_0,
OPT_STREAM_INTERSECTION,
OPT_TIMERANGE,
- OPT_URL,
OPT_VERBOSE,
OPT_VERSION,
};
fprintf(fp, " -p, --params=PARAMS Add initialization parameters PARAMS to the\n");
fprintf(fp, " current component (see the expected format\n");
fprintf(fp, " of PARAMS below)\n");
- fprintf(fp, " -P, --path=PATH Set the `path` string parameter of the\n");
- fprintf(fp, " current component to PATH\n");
fprintf(fp, " --plugin-path=PATH[:PATH]... Add PATH to the list of paths from which\n");
fprintf(fp, " dynamic plugins can be loaded\n");
fprintf(fp, " --retry-duration=DUR When babeltrace2(1) needs to retry to run\n");
fprintf(fp, " formatted for `xargs -0`, and quit\n");
fprintf(fp, " --stream-intersection Only process events when all streams\n");
fprintf(fp, " are active\n");
- fprintf(fp, " -u, --url=URL Set the `url` string parameter of the\n");
- fprintf(fp, " current component to URL\n");
fprintf(fp, " -h, --help Show this help and quit\n");
fprintf(fp, "\n");
fprintf(fp, "Implicit `source.ctf.fs` component options:\n");
{ OPT_OUTPUT, 'w', "output", true },
{ OPT_OUTPUT_FORMAT, 'o', "output-format", true },
{ OPT_PARAMS, 'p', "params", true },
- { OPT_PATH, 'P', "path", true },
{ OPT_PLUGIN_PATH, '\0', "plugin-path", true },
{ OPT_RETRY_DURATION, '\0', "retry-duration", true },
{ OPT_RUN_ARGS, '\0', "run-args", false },
{ OPT_RUN_ARGS_0, '\0', "run-args-0", false },
{ OPT_STREAM_INTERSECTION, '\0', "stream-intersection", false },
{ OPT_TIMERANGE, '\0', "timerange", true },
- { OPT_URL, 'u', "url", true },
{ OPT_VERBOSE, 'v', "verbose", false },
BT_ARGPAR_OPT_DESCR_SENTINEL
};
* First pass: collect all arguments which need to be passed
* as is to the run command. This pass can also add --name
* arguments if needed to automatically name unnamed component
- * instances. Also it does the following transformations:
- *
- * --path=PATH -> --params=path="PATH"
- * --url=URL -> --params=url="URL"
+ * instances.
*
* Also it appends the plugin paths of --plugin-path to
* `plugin_paths`.
goto error;
}
break;
- case OPT_PATH:
- if (cur_name_prefix->len == 0) {
- BT_CLI_LOGE_APPEND_CAUSE("No current component of which to set `path` parameter:\n %s",
- arg);
- goto error;
- }
-
- if (append_string_parameter_to_args(run_args, "path", arg)) {
- goto error;
- }
- break;
- case OPT_URL:
- if (cur_name_prefix->len == 0) {
- BT_CLI_LOGE_APPEND_CAUSE("No current component of which to set `url` parameter:\n %s",
- arg);
- goto error;
- }
-
-
- if (append_string_parameter_to_args(run_args, "url", arg)) {
- goto error;
- }
- break;
case OPT_NAME:
if (cur_name_prefix->len == 0) {
BT_CLI_LOGE_APPEND_CAUSE("No current component to name:\n %s",
output_path=$(cygpath -m "$output_path")
fi
-plan_tests 77
+plan_tests 73
test_bt_convert_run_args 'path leftover' "$path_to_trace" "--component source.ctf.fs --name auto-disc-source-ctf-fs --params 'inputs=[\"$path_to_trace\"]' --component sink.text.pretty --name pretty --component filter.utils.muxer --name muxer --connect auto-disc-source-ctf-fs:muxer --connect muxer:pretty"
test_bt_convert_run_args 'path leftovers' "$path_to_trace $path_to_trace2" "--component source.ctf.fs --name auto-disc-source-ctf-fs --params 'inputs=[\"$path_to_trace\", \"${path_to_trace2}\"]' --component sink.text.pretty --name pretty --component filter.utils.muxer --name muxer --connect auto-disc-source-ctf-fs:muxer --connect muxer: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 auto-disc-source-ctf-fs --params 'inputs=[\"$path_to_trace\"]' --component sink.text.pretty --name pretty --component filter.utils.muxer --name muxer --connect ZZ:muxer --connect auto-disc-source-ctf-fs:muxer --connect muxer:pretty"
test_bt_convert_run_args 'path leftover + named user source with --name --params' "$path_to_trace --component source.another.source --name HELLO --params salut=yes" "--component source.another.source --name HELLO --params salut=yes --component source.ctf.fs --name auto-disc-source-ctf-fs --params 'inputs=[\"$path_to_trace\"]' --component sink.text.pretty --name pretty --component filter.utils.muxer --name muxer --connect HELLO:muxer --connect auto-disc-source-ctf-fs:muxer --connect muxer:pretty"
-test_bt_convert_run_args 'path leftover + user source with --path --params' "$path_to_trace --component source.another.source --path some-path --params salut=yes" "--component source.another.source --params 'path=\"some-path\"' --params salut=yes --name source.another.source --component source.ctf.fs --name auto-disc-source-ctf-fs --params 'inputs=[\"$path_to_trace\"]' --component sink.text.pretty --name pretty --component filter.utils.muxer --name muxer --connect 'source\\.another\\.source:muxer' --connect auto-disc-source-ctf-fs:muxer --connect muxer:pretty"
-test_bt_convert_run_args 'user source with --url + -o dummy' '--component MY:source.my.source --url the-url -o dummy' "--component MY:source.my.source --params 'url=\"the-url\"' --component sink.utils.dummy --name dummy --component filter.utils.muxer --name muxer --connect MY:muxer --connect muxer:dummy"
test_bt_convert_run_args 'path leftover + --omit-home-plugin-path' "$path_to_trace --omit-home-plugin-path" "--omit-home-plugin-path --component source.ctf.fs --name auto-disc-source-ctf-fs --params 'inputs=[\"$path_to_trace\"]' --component sink.text.pretty --name pretty --component filter.utils.muxer --name muxer --connect auto-disc-source-ctf-fs:muxer --connect muxer:pretty"
test_bt_convert_run_args 'path leftover + --omit-system-plugin-path' "$path_to_trace --omit-system-plugin-path" "--omit-system-plugin-path --component source.ctf.fs --name auto-disc-source-ctf-fs --params 'inputs=[\"$path_to_trace\"]' --component sink.text.pretty --name pretty --component filter.utils.muxer --name muxer --connect auto-disc-source-ctf-fs:muxer --connect muxer:pretty"
test_bt_convert_run_args 'path leftover + --plugin-path' "--plugin-path=PATH1:PATH2 $path_to_trace" "--plugin-path PATH1:PATH2 --component source.ctf.fs --name auto-disc-source-ctf-fs --params 'inputs=[\"$path_to_trace\"]' --component sink.text.pretty --name pretty --component filter.utils.muxer --name muxer --connect auto-disc-source-ctf-fs:muxer --connect muxer:pretty"
test_bt_convert_fails 'duplicate component name' '--component hello:sink.a.b --component hello:source.c.d'
test_bt_convert_fails 'unknown option' '--component hello:sink.a.b --salut'
test_bt_convert_fails '--params without current component' '--params lol=23'
-test_bt_convert_fails '--path without current component' "--path $path_to_trace"
-test_bt_convert_fails '--url without current component' '--url net://some-host/host/target/session'
test_bt_convert_fails '--nane without current component' '--name chapeau'
test_bt_convert_fails 'duplicate --begin' '--begin abc --clock-seconds --begin cde'
test_bt_convert_fails 'duplicate --end' '--begin abc --end xyz --clock-seconds --end cde'