tests: add typing annotations to lttng_live_server.py
[babeltrace.git] / tests / plugins / src.ctf.lttng-live / test_live
index 50cf3dfa7d9789eea620c1cb0e9311d8b5dfc712..f694d799e9a3697c0c4d2e8550d410e1805fc0c1 100755 (executable)
@@ -5,15 +5,16 @@
 # Copyright (C) 2019 Philippe Proulx <pproulx@efficios.com>
 #
 
-# This test validates that a `src.ctf.fs` component successfully reads
-# specific CTF traces and creates the expected messages.
+# This test validates that a `src.ctf.lttng-live` component successfully does
+# various tasks that a `src.ctf.lttng-live` component is expected to do, like
+# listing tracing sessions and receiving live traces / producing the expected
+# messages out of it.
 #
-# Such CTF traces to open either exist (in `tests/ctf-traces/`)
-# or are generated by this test using local trace generators.
+# A mock LTTng live server is used to feed data to the component.
 
 SH_TAP=1
 
-if [ "x${BT_TESTS_SRCDIR:-}" != "x" ]; then
+if [ -n "${BT_TESTS_SRCDIR:-}" ]; then
        UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh"
 else
        UTILSSH="$(dirname "$0")/../../utils/utils.sh"
@@ -54,7 +55,8 @@ lttng_live_server() {
        local server_script="$test_data_dir/lttng_live_server.py"
 
        # start server
-       echo "$server_args" | xargs "$BT_TESTS_PYTHON_BIN" "$server_script" \
+       diag "$BT_TESTS_PYTHON_BIN $server_script --port-file $port_file --trace-path-prefix $trace_dir_native $server_args"
+       echo "$server_args" | run_python xargs "$BT_TESTS_PYTHON_BIN" "$server_script" \
                --port-file "$port_file" \
                --trace-path-prefix "$trace_dir_native" &
 
This page took 0.022599 seconds and 4 git commands to generate.