X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Fplugins%2Fsrc.ctf.fs%2Fquery%2Ftest_query_support_info.py;h=d3ff276a51aedb519984df14e18e1c948191eb18;hb=f5567ea88d172767b34373bc6e402da8bfd85ef8;hp=f094865a0ee8c60c72d60a8d203684a4f6fb03bf;hpb=493917ba0c27f2fd5d5ed7428fc590a1f03ba5d7;p=babeltrace.git diff --git a/tests/plugins/src.ctf.fs/query/test_query_support_info.py b/tests/plugins/src.ctf.fs/query/test_query_support_info.py index f094865a..d3ff276a 100644 --- a/tests/plugins/src.ctf.fs/query/test_query_support_info.py +++ b/tests/plugins/src.ctf.fs/query/test_query_support_info.py @@ -1,18 +1,7 @@ -# Copyright (C) 2019 Simon Marchi -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; only version 2 -# of the License. +# SPDX-License-Identifier: GPL-2.0-only # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# Copyright (C) 2019 Simon Marchi # -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import unittest import bt2 @@ -20,55 +9,55 @@ import os session_rotation_trace_path = os.path.join( - os.environ['BT_CTF_TRACES_PATH'], 'succeed', 'session-rotation' + os.environ["BT_CTF_TRACES_PATH"], "succeed", "session-rotation" ) trace_10352_1 = os.path.join( session_rotation_trace_path, - 'archives', - '20190826T155748-0400-20190826T155751-0400-1', - 'ust', - 'pid', - 'hello-ust-10352-20190826-155748', + "archives", + "20190826T155748-0400-20190826T155751-0400-1", + "ust", + "pid", + "hello-ust-10352-20190826-155748", ) trace_10353_1 = os.path.join( session_rotation_trace_path, - 'archives', - '20190826T155748-0400-20190826T155751-0400-1', - 'ust', - 'pid', - 'hello-ust-10353-20190826-155748', + "archives", + "20190826T155748-0400-20190826T155751-0400-1", + "ust", + "pid", + "hello-ust-10353-20190826-155748", ) trace_10352_2 = os.path.join( session_rotation_trace_path, - 'archives', - '20190826T155750-0400-20190826T155753-0400-2', - 'ust', - 'pid', - 'hello-ust-10352-20190826-155748', + "archives", + "20190826T155750-0400-20190826T155753-0400-2", + "ust", + "pid", + "hello-ust-10352-20190826-155748", ) trace_10353_2 = os.path.join( session_rotation_trace_path, - 'archives', - '20190826T155750-0400-20190826T155753-0400-2', - 'ust', - 'pid', - 'hello-ust-10353-20190826-155748', + "archives", + "20190826T155750-0400-20190826T155753-0400-2", + "ust", + "pid", + "hello-ust-10353-20190826-155748", ) trace_10352_3 = os.path.join( session_rotation_trace_path, - '20190826T155753-0400-3', - 'ust', - 'pid', - 'hello-ust-10352-20190826-155748', + "20190826T155753-0400-3", + "ust", + "pid", + "hello-ust-10352-20190826-155748", ) trace_10353_3 = os.path.join( session_rotation_trace_path, - '20190826T155753-0400-3', - 'ust', - 'pid', - 'hello-ust-10353-20190826-155748', + "20190826T155753-0400-3", + "ust", + "pid", + "hello-ust-10353-20190826-155748", ) @@ -78,22 +67,22 @@ class QuerySupportInfoTestCase(unittest.TestCase): def do_one_query(input, expected_group): qe = bt2.QueryExecutor( - fs, 'babeltrace.support-info', {'input': input, 'type': 'directory'} + fs, "babeltrace.support-info", {"input": input, "type": "directory"} ) result = qe.query() - self.assertEqual(result['group'], expected_group) + self.assertEqual(result["group"], expected_group) - ctf = bt2.find_plugin('ctf') - fs = ctf.source_component_classes['fs'] + ctf = bt2.find_plugin("ctf") + fs = ctf.source_component_classes["fs"] - do_one_query(trace_10352_1, '21cdfa5e-9a64-490a-832c-53aca6c101ba') - do_one_query(trace_10352_2, '21cdfa5e-9a64-490a-832c-53aca6c101ba') - do_one_query(trace_10352_3, '21cdfa5e-9a64-490a-832c-53aca6c101ba') - do_one_query(trace_10353_1, '83656eb1-b131-40e7-9666-c04ae279b58c') - do_one_query(trace_10353_2, '83656eb1-b131-40e7-9666-c04ae279b58c') - do_one_query(trace_10353_3, '83656eb1-b131-40e7-9666-c04ae279b58c') + do_one_query(trace_10352_1, "21cdfa5e-9a64-490a-832c-53aca6c101ba") + do_one_query(trace_10352_2, "21cdfa5e-9a64-490a-832c-53aca6c101ba") + do_one_query(trace_10352_3, "21cdfa5e-9a64-490a-832c-53aca6c101ba") + do_one_query(trace_10353_1, "83656eb1-b131-40e7-9666-c04ae279b58c") + do_one_query(trace_10353_2, "83656eb1-b131-40e7-9666-c04ae279b58c") + do_one_query(trace_10353_3, "83656eb1-b131-40e7-9666-c04ae279b58c") -if __name__ == '__main__': +if __name__ == "__main__": unittest.main()