1 # Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; only version 2
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 session_rotation_trace_path
= os
.path
.join(
23 os
.environ
['BT_CTF_TRACES_PATH'], 'succeed', 'session-rotation'
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
,
75 class QuerySupportInfoTestCase(unittest
.TestCase
):
76 def test_support_info_with_uuid(self
):
77 # Test that the right group is reported for each trace.
79 def do_one_query(input, expected_group
):
80 qe
= bt2
.QueryExecutor(
81 fs
, 'babeltrace.support-info', {'input': input, 'type': 'directory'}
85 self
.assertEqual(result
['group'], expected_group
)
87 ctf
= bt2
.find_plugin('ctf')
88 fs
= ctf
.source_component_classes
['fs']
90 do_one_query(trace_10352_1
, '21cdfa5e-9a64-490a-832c-53aca6c101ba')
91 do_one_query(trace_10352_2
, '21cdfa5e-9a64-490a-832c-53aca6c101ba')
92 do_one_query(trace_10352_3
, '21cdfa5e-9a64-490a-832c-53aca6c101ba')
93 do_one_query(trace_10353_1
, '83656eb1-b131-40e7-9666-c04ae279b58c')
94 do_one_query(trace_10353_2
, '83656eb1-b131-40e7-9666-c04ae279b58c')
95 do_one_query(trace_10353_3
, '83656eb1-b131-40e7-9666-c04ae279b58c')
98 if __name__
== '__main__':