bt2: Adapt test_graph.py and make it pass
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 3 Jun 2019 20:45:56 +0000 (16:45 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 5 Jun 2019 17:47:34 +0000 (13:47 -0400)
commit5f25509b06eb8dd0a76d3068894d9f8fefd63178
tree0a2cd0e481704473b5233b649c88f215d224ee58
parent8cc56726828daf6e193dc131435948d2c9a2cb4e
bt2: Adapt test_graph.py and make it pass

This patch updates test_graph.py and graph.py to work with the current
BT API.

An important change is that now, the port added and ports connected
listeners can report their failures up the stack.  Therefore, if a
Python listener raises an exception, we now report it as an error.  Some
tests are added for this.

The tests:

 - test_connect_ports_canceled
 - test_connect_ports_cannot_consume_accept
 - test_connect_ports_cannot_consume_connected

were removed, since the library no longer returns an error in these
situations (they are just verified by precondition check).  However, a
test was added to check that when the graph gets cancelled during
execution, a bt2.GraphCanceled gets raised.

Some changes in message.py, message_iterator.py and port.py are
necessary to support the test.  They are not complete, but they are
representative of what will come after.

Any reference to ports being removed or disconnected were removed, since
it's not longer possible to remove or disconnect a port.

Change-Id: Ie8f11553f34208bb58242d9108efc361acba3c18
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/+/1317
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins
bindings/python/bt2/bt2/component.py
bindings/python/bt2/bt2/graph.py
bindings/python/bt2/bt2/message.py
bindings/python/bt2/bt2/message_iterator.py
bindings/python/bt2/bt2/native_bt_graph.i
bindings/python/bt2/bt2/port.py
tests/bindings/python/bt2/test_graph.py
This page took 0.024906 seconds and 4 git commands to generate.