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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 5 Jun 2019 17:47:34 +0000 (13:47 -0400)
commit9ec609eca33472c516129ba3b1257fbfc1978e77
treed3952a97a221d8ff51c34af13405f22c42cfceb3
parent1eccc498917f855490876fc8b3e41f90f89f1c6d
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.025021 seconds and 4 git commands to generate.