bt2: Adapt test_event.py and make it pass
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 13 May 2019 17:43:38 +0000 (13:43 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 5 Jun 2019 17:47:34 +0000 (13:47 -0400)
commit2ae9f48c88d9359f2b2bf1cbac3c6dab5a22cfbb
treece59ef10486c2c7ff88b08a1861bea0ffd001974
parent36d1acad60fd6c9cfb933f3f2fbc039443d47115
bt2: Adapt test_event.py and make it pass

This patch changes test_event.py to work with the current BT API and
adapts event.py accordingly to make it pass.  Since this is a central
piece of the API (it has many related concepts), a few other files are
modified as well, just enough to support the test.  For example, events
are no longer created directly, instead we need to instantiate an
EventMessage.  This requires to get the foundation for messages
working.  Even though the changes in message_iterator (the "create"
methods to create various messages) are not complete, it gives an idea
of what is to come, so it would be good to get some comments on it right
now.

In event.py, things related to clock snapshots, header fields, equality,
copy and deep copy are removed.

In test_event.py, we now need a bigger setup, since events are created
from event messages, which are created from output iterators, which are
created from components.

In object.py, UniqueObject now needs to record its _owner_get_ref
callback, so that if we get a second UniqueObject from an existing
UniqueObject (such as a sub-field from a struct field), the callback can
be passed to the new object.

Change-Id: I72309826a61245b0fe4fdd9a638ddee3689c5921
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1298
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins
13 files changed:
bindings/python/bt2/bt2/__init__.py.in
bindings/python/bt2/bt2/clock_snapshot.py
bindings/python/bt2/bt2/component.py
bindings/python/bt2/bt2/event.py
bindings/python/bt2/bt2/field.py
bindings/python/bt2/bt2/field_class.py
bindings/python/bt2/bt2/graph.py
bindings/python/bt2/bt2/message.py
bindings/python/bt2/bt2/message_iterator.py
bindings/python/bt2/bt2/object.py
bindings/python/bt2/bt2/packet.py
bindings/python/bt2/bt2/trace_class.py
tests/bindings/python/bt2/test_event.py
This page took 0.025539 seconds and 4 git commands to generate.