bt2: Adapt test_message.py and make it pass
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 3 Jun 2019 22:28:10 +0000 (18:28 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:21 +0000 (17:24 -0400)
commit0010c8b05b7e916a86cb701eabd1e11cbb552ffb
treec3ed40555fa2f9d56e4993af74f41833ab362227
parent4470d3a6fec465dcf612e044ef0b11b040b1a5f1
bt2: Adapt test_message.py and make it pass

Update test_message.py to match the current Babeltrace API.  Update
message.py to also match the current API and make the test pass.
message_iterator.py is also updated, as it is required by the test, but
just the essential changes are done.

The test changes substantially, since it is no longer possible to create
a message by itself, they are created from a component message iterator,
which requires quite a bit of setup.  Also, it would be invalid to emit
an "event message" without having first emitted a "stream beginning
message", "packet beginning message", and so on.  So testing the message
types in isolation would required quite a lot of boilerplate.  This is
why all messages types are now tested in the same test.  We have a
source that emits all message types at least once.  The sink on the
other side verifies that what it receives from the source is what we
expect.

Everything related to equality, copy and deep copy is removed.

Change-Id: Ibe6146049cc1065df82dde821a42f10d4e5bba27
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/+/1324
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins
bindings/python/bt2/bt2/__init__.py.in
bindings/python/bt2/bt2/clock_snapshot.py
bindings/python/bt2/bt2/message.py
bindings/python/bt2/bt2/message_iterator.py
bindings/python/bt2/bt2/native_bt_message.i
tests/bindings/python/bt2/test_event.py
tests/bindings/python/bt2/test_message.py
This page took 0.025585 seconds and 4 git commands to generate.