X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=tests%2Fplugins%2Fsrc.ctf.fs%2Fquery%2Ftest_query_support_info.py;h=527a5daec1c1f4d8ac6743145a3930dcd7e9aef6;hp=f094865a0ee8c60c72d60a8d203684a4f6fb03bf;hb=8dea686a2397bdadb81f44a3e74fd39fd7397ee2;hpb=493917ba0c27f2fd5d5ed7428fc590a1f03ba5d7 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..527a5dae 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', + "a", + "1", + "ust", + "pid", + "10352", ) trace_10353_1 = os.path.join( session_rotation_trace_path, - 'archives', - '20190826T155748-0400-20190826T155751-0400-1', - 'ust', - 'pid', - 'hello-ust-10353-20190826-155748', + "a", + "1", + "ust", + "pid", + "10353", ) trace_10352_2 = os.path.join( session_rotation_trace_path, - 'archives', - '20190826T155750-0400-20190826T155753-0400-2', - 'ust', - 'pid', - 'hello-ust-10352-20190826-155748', + "a", + "2", + "ust", + "pid", + "10352", ) trace_10353_2 = os.path.join( session_rotation_trace_path, - 'archives', - '20190826T155750-0400-20190826T155753-0400-2', - 'ust', - 'pid', - 'hello-ust-10353-20190826-155748', + "a", + "2", + "ust", + "pid", + "10353", ) trace_10352_3 = os.path.join( session_rotation_trace_path, - '20190826T155753-0400-3', - 'ust', - 'pid', - 'hello-ust-10352-20190826-155748', + "3", + "ust", + "pid", + "10352", ) trace_10353_3 = os.path.join( session_rotation_trace_path, - '20190826T155753-0400-3', - 'ust', - 'pid', - 'hello-ust-10353-20190826-155748', + "3", + "ust", + "pid", + "10353", ) @@ -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()