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>
This page took 0.02593 seconds and 4 git commands to generate.