X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=tests%2Fdata%2Fauto-source-discovery%2Fgrouping%2Fbt_plugin_test.py;h=c885040ce7801c7ef8014906c778e270cfca9fdc;hp=a4d53dbd88d75b267badb2ed8b645e2698b69aaa;hb=0235b0db7de5bcacdb3650c92461f2ce5eb2143d;hpb=75cae5aff026ce4c6285f2de39aba9f709dd6ac5 diff --git a/tests/data/auto-source-discovery/grouping/bt_plugin_test.py b/tests/data/auto-source-discovery/grouping/bt_plugin_test.py index a4d53dbd..c885040c 100644 --- a/tests/data/auto-source-discovery/grouping/bt_plugin_test.py +++ b/tests/data/auto-source-discovery/grouping/bt_plugin_test.py @@ -1,3 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-only +# +# Copyright (C) 2019 EfficiOS Inc. +# + import bt2 import os @@ -8,7 +13,7 @@ import os class TestIter(bt2._UserMessageIterator): - def __init__(self, output_port): + def __init__(self, config, output_port): inputs = output_port.user_data['inputs'] sc = output_port.user_data['sc'] tc = sc.trace_class @@ -52,7 +57,7 @@ class TestSourceExt(Base, bt2._UserSourceComponent, message_iterator_class=TestI files are not grouped. """ - def __init__(self, params, obj): + def __init__(self, config, params, obj): super().__init__(params) @staticmethod @@ -66,13 +71,8 @@ class TestSourceExt(Base, bt2._UserSourceComponent, message_iterator_class=TestI elif name.startswith('bbb'): return {'weight': 0.5, 'group': 'bbb'} elif name.startswith('ccc'): - # Try two different ways of returning "no group", and two - # different ways of returning 1 (an int and a float). + # Try two different ways of returning 1 (an int and a float). if name[3] == '1': - return {'weight': 1, 'group': None} - elif name[3] == '2': - return {'weight': 1.0, 'group': None} - elif name[3] == '3': return 1 else: return 1.0 @@ -90,7 +90,7 @@ class TestSourceSomeDir( directory "some-dir" won't be found by TestSourceExt, because we won't recurse in "some-dir".""" - def __init__(self, params, obj): + def __init__(self, config, params, obj): super().__init__(params) @staticmethod @@ -109,7 +109,7 @@ class TestSourceSomeDir( class TestSourceABCDE(Base, bt2._UserSourceComponent, message_iterator_class=TestIter): """A source that recognizes the arbitrary string input "ABCDE".""" - def __init__(self, params, obj): + def __init__(self, config, params, obj): super().__init__(params) @staticmethod