X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Fbindings%2Fpython%2Fbt2%2Ftest_trace_collection_message_iterator.py;h=e804a4f232ab2fa6b3a62f063a779eaa4178e7f4;hb=188edac1113dbbb29030681dbde2de0ada742499;hp=e30cad4332ca3b4dda88d83985480e95eaf36f0b;hpb=907f2b70dce96396c5b5b0e2111539664d1a2c44;p=babeltrace.git diff --git a/tests/bindings/python/bt2/test_trace_collection_message_iterator.py b/tests/bindings/python/bt2/test_trace_collection_message_iterator.py index e30cad43..e804a4f2 100644 --- a/tests/bindings/python/bt2/test_trace_collection_message_iterator.py +++ b/tests/bindings/python/bt2/test_trace_collection_message_iterator.py @@ -1,3 +1,21 @@ +# +# Copyright (C) 2019 EfficiOS Inc. +# +# 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. +# +# 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. +# +# 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 datetime import bt2 @@ -5,8 +23,8 @@ import os import os.path -_TEST_CTF_TRACES_PATH = os.environ['TEST_CTF_TRACES_PATH'] -_3EVENTS_INTERSECT_TRACE_PATH = os.path.join(_TEST_CTF_TRACES_PATH, +_BT_CTF_TRACES_PATH = os.environ['BT_CTF_TRACES_PATH'] +_3EVENTS_INTERSECT_TRACE_PATH = os.path.join(_BT_CTF_TRACES_PATH, 'intersection', '3eventsintersect') @@ -93,7 +111,7 @@ class TraceCollectionMessageIteratorTestCase(unittest.TestCase): specs = [bt2.ComponentSpec('ctf', 'fs', _3EVENTS_INTERSECT_TRACE_PATH)] msg_iter = bt2.TraceCollectionMessageIterator(specs) msgs = list(msg_iter) - self.assertEqual(len(msgs), 32) + self.assertEqual(len(msgs), 28) hist = _count_msgs_by_type(msgs) self.assertEqual(hist[bt2.message._EventMessage], 8) @@ -102,7 +120,7 @@ class TraceCollectionMessageIteratorTestCase(unittest.TestCase): spec = bt2.ComponentSpec('ctf', 'fs', _3EVENTS_INTERSECT_TRACE_PATH) msg_iter = bt2.TraceCollectionMessageIterator(spec) msgs = list(msg_iter) - self.assertEqual(len(msgs), 32) + self.assertEqual(len(msgs), 28) hist = _count_msgs_by_type(msgs) self.assertEqual(hist[bt2.message._EventMessage], 8) @@ -119,7 +137,7 @@ class TraceCollectionMessageIteratorTestCase(unittest.TestCase): specs = [bt2.ComponentSpec('ctf', 'fs', _3EVENTS_INTERSECT_TRACE_PATH)] msg_iter = bt2.TraceCollectionMessageIterator(specs, stream_intersection_mode=True) msgs = list(msg_iter) - self.assertEqual(len(msgs), 19) + self.assertEqual(len(msgs), 15) hist = _count_msgs_by_type(msgs) self.assertEqual(hist[bt2.message._EventMessage], 3) @@ -134,7 +152,7 @@ class TraceCollectionMessageIteratorTestCase(unittest.TestCase): specs = [spec, spec] msg_iter = bt2.TraceCollectionMessageIterator(specs) msgs = list(msg_iter) - self.assertEqual(len(msgs), 64) + self.assertEqual(len(msgs), 56) hist = _count_msgs_by_type(msgs) self.assertEqual(hist[bt2.message._EventMessage], 16)