bt2: Adapt test_trace_collection_message_iterator.py and make it pass
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 23 May 2019 15:59:39 +0000 (11:59 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 5 Jun 2019 17:47:34 +0000 (13:47 -0400)
commit907f2b70dce96396c5b5b0e2111539664d1a2c44
treed62fd99f501980577d0094fa0c2fd3a0576068eb
parent2e00bc76cf37af167c45253cfc8f8d197222d6b8
bt2: Adapt test_trace_collection_message_iterator.py and make it pass

Update test_trace_collection_message_iterator.py and
trace_collection_message_iterator.py to work with the current Babeltrace
API.

It is no longer possible to pass a "message type" filter to a message
iterator.  This means that the TraceCollectionMessageIterator objects in
the test now return all messages, where we previously filtered to only
have those of type EventMessage.  The new count_msg_by_type function
helps to get around this problem.

In trace_collection_message_iterator.py, there are just a few changes to
account for the API changes.  The src.ctf.fs component now takes a
"paths" parameter instead of "path".  It is no longer possible to get a
component from a port, instead we use the component passed as a
parameter in the callbacks.

The change in the way we handle the timestamps in _create_trimmer is due
to the fact that if we pass a single integer, it is interpreted as
seconds.  Since we have a number of nanoseconds, it is misinterpreted.
Instead, pass a string in the seconds.nanoseconds form.

Change-Id: Iddd1666008d06e49843932dc74ee51ac772d001b
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1328
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
bindings/python/bt2/bt2/trace_collection_message_iterator.py
tests/bindings/python/bt2/test_trace_collection_message_iterator.py
This page took 0.024454 seconds and 4 git commands to generate.