From 2439d12bc9f08af6e5c6ab71556e50b824c3dca6 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 18 Sep 2023 14:18:54 -0400 Subject: [PATCH] tests: make lttng_live_server.py print session URLs To help with interactive use, make lttng_live_server.py print session URLs that you can pass directly to babeltrace. For instance: $ PYTHONPATH=/home/smarchi/src/babeltrace/tests/utils/python /opt/python/3.4.10/bin/python3 lttng_live_server.py --trace-path-prefix /home/smarchi/src/babeltrace/tests/data/ctf-traces split_metadata.json --port 1245 Listening on port 1245 net://localhost:1245/host/hostname/split_metadata Change-Id: Ib4d806804bfdc00132ec7987c62016ad976b50d2 Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/10900 Tested-by: jenkins Reviewed-by: Philippe Proulx --- .../data/plugins/src.ctf.lttng-live/lttng_live_server.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/data/plugins/src.ctf.lttng-live/lttng_live_server.py b/tests/data/plugins/src.ctf.lttng-live/lttng_live_server.py index 5e1e8e69..5d844029 100644 --- a/tests/data/plugins/src.ctf.lttng-live/lttng_live_server.py +++ b/tests/data/plugins/src.ctf.lttng-live/lttng_live_server.py @@ -1668,6 +1668,14 @@ class LttngLiveServer: print("Listening on port {}".format(self._server_port)) + for ts_descr in tracing_session_descriptors: + info = ts_descr.info + print( + "net://localhost:{}/host/{}/{}".format( + self._server_port, info.hostname, info.name + ) + ) + try: self._listen() finally: -- 2.34.1