1 # SPDX-License-Identifier: GPL-2.0-only
3 # Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
10 from test_all_ctf_versions
import test_all_ctf_versions
13 @test_all_ctf_versions
14 class QuerySupportInfoTestCase(unittest
.TestCase
):
15 def test_support_info_with_uuid(self
):
16 # Test that the right group is reported for each trace.
17 ctf
= bt2
.find_plugin("ctf")
18 fs
= ctf
.source_component_classes
["fs"]
20 session_rotation_trace_path
= os
.path
.join(
21 os
.environ
["BT_CTF_TRACES_PATH"],
22 str(self
._ctf
_version
),
27 trace_10352_1
= os
.path
.join(
28 session_rotation_trace_path
,
35 trace_10353_1
= os
.path
.join(
36 session_rotation_trace_path
,
43 trace_10352_2
= os
.path
.join(
44 session_rotation_trace_path
,
51 trace_10353_2
= os
.path
.join(
52 session_rotation_trace_path
,
59 trace_10352_3
= os
.path
.join(
60 session_rotation_trace_path
,
66 trace_10353_3
= os
.path
.join(
67 session_rotation_trace_path
,
74 def do_one_query(input, expected_group
):
75 qe
= bt2
.QueryExecutor(
76 fs
, "babeltrace.support-info", {"input": input, "type": "directory"}
80 self
.assertEqual(result
["group"], expected_group
)
82 do_one_query(trace_10352_1
, "21cdfa5e-9a64-490a-832c-53aca6c101ba")
83 do_one_query(trace_10352_2
, "21cdfa5e-9a64-490a-832c-53aca6c101ba")
84 do_one_query(trace_10352_3
, "21cdfa5e-9a64-490a-832c-53aca6c101ba")
85 do_one_query(trace_10353_1
, "83656eb1-b131-40e7-9666-c04ae279b58c")
86 do_one_query(trace_10353_2
, "83656eb1-b131-40e7-9666-c04ae279b58c")
87 do_one_query(trace_10353_3
, "83656eb1-b131-40e7-9666-c04ae279b58c")
90 if __name__
== "__main__":