tests: shorten names of session-rotation trace
[babeltrace.git] / tests / plugins / src.ctf.fs / query / test_query_support_info.py
CommitLineData
1d3426bc
SM
1# Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
2#
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
6# of the License.
7#
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.
12#
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.
16
17import unittest
18import bt2
19import os
20
21
22session_rotation_trace_path = os.path.join(
23 os.environ['BT_CTF_TRACES_PATH'], 'succeed', 'session-rotation'
24)
25
26
27trace_10352_1 = os.path.join(
28 session_rotation_trace_path,
ca78c944
SM
29 "a",
30 "1",
31 "ust",
32 "pid",
33 "10352",
1d3426bc
SM
34)
35trace_10353_1 = os.path.join(
36 session_rotation_trace_path,
ca78c944
SM
37 "a",
38 "1",
39 "ust",
40 "pid",
41 "10353",
1d3426bc
SM
42)
43trace_10352_2 = os.path.join(
44 session_rotation_trace_path,
ca78c944
SM
45 "a",
46 "2",
47 "ust",
48 "pid",
49 "10352",
1d3426bc
SM
50)
51trace_10353_2 = os.path.join(
52 session_rotation_trace_path,
ca78c944
SM
53 "a",
54 "2",
55 "ust",
56 "pid",
57 "10353",
1d3426bc
SM
58)
59trace_10352_3 = os.path.join(
60 session_rotation_trace_path,
ca78c944
SM
61 "3",
62 "ust",
63 "pid",
64 "10352",
1d3426bc
SM
65)
66trace_10353_3 = os.path.join(
67 session_rotation_trace_path,
ca78c944
SM
68 "3",
69 "ust",
70 "pid",
71 "10353",
1d3426bc
SM
72)
73
74
75class QuerySupportInfoTestCase(unittest.TestCase):
76 def test_support_info_with_uuid(self):
77 # Test that the right group is reported for each trace.
78
79 def do_one_query(input, expected_group):
80 qe = bt2.QueryExecutor(
81 fs, 'babeltrace.support-info', {'input': input, 'type': 'directory'}
82 )
83
84 result = qe.query()
85 self.assertEqual(result['group'], expected_group)
86
87 ctf = bt2.find_plugin('ctf')
88 fs = ctf.source_component_classes['fs']
89
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')
96
97
98if __name__ == '__main__':
99 unittest.main()
This page took 0.037796 seconds and 4 git commands to generate.