1 # SPDX-License-Identifier: GPL-2.0-only
3 # Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
11 session_rotation_trace_path
= os
.path
.join(
12 os
.environ
['BT_CTF_TRACES_PATH'], 'succeed', 'session-rotation'
16 trace_10352_1
= os
.path
.join(
17 session_rotation_trace_path
,
19 '20190826T155748-0400-20190826T155751-0400-1',
22 'hello-ust-10352-20190826-155748',
24 trace_10353_1
= os
.path
.join(
25 session_rotation_trace_path
,
27 '20190826T155748-0400-20190826T155751-0400-1',
30 'hello-ust-10353-20190826-155748',
32 trace_10352_2
= os
.path
.join(
33 session_rotation_trace_path
,
35 '20190826T155750-0400-20190826T155753-0400-2',
38 'hello-ust-10352-20190826-155748',
40 trace_10353_2
= os
.path
.join(
41 session_rotation_trace_path
,
43 '20190826T155750-0400-20190826T155753-0400-2',
46 'hello-ust-10353-20190826-155748',
48 trace_10352_3
= os
.path
.join(
49 session_rotation_trace_path
,
50 '20190826T155753-0400-3',
53 'hello-ust-10352-20190826-155748',
55 trace_10353_3
= os
.path
.join(
56 session_rotation_trace_path
,
57 '20190826T155753-0400-3',
60 'hello-ust-10353-20190826-155748',
64 class QuerySupportInfoTestCase(unittest
.TestCase
):
65 def test_support_info_with_uuid(self
):
66 # Test that the right group is reported for each trace.
68 def do_one_query(input, expected_group
):
69 qe
= bt2
.QueryExecutor(
70 fs
, 'babeltrace.support-info', {'input': input, 'type': 'directory'}
74 self
.assertEqual(result
['group'], expected_group
)
76 ctf
= bt2
.find_plugin('ctf')
77 fs
= ctf
.source_component_classes
['fs']
79 do_one_query(trace_10352_1
, '21cdfa5e-9a64-490a-832c-53aca6c101ba')
80 do_one_query(trace_10352_2
, '21cdfa5e-9a64-490a-832c-53aca6c101ba')
81 do_one_query(trace_10352_3
, '21cdfa5e-9a64-490a-832c-53aca6c101ba')
82 do_one_query(trace_10353_1
, '83656eb1-b131-40e7-9666-c04ae279b58c')
83 do_one_query(trace_10353_2
, '83656eb1-b131-40e7-9666-c04ae279b58c')
84 do_one_query(trace_10353_3
, '83656eb1-b131-40e7-9666-c04ae279b58c')
87 if __name__
== '__main__':