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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:21 +0000 (17:24 -0400)
commit871a292a9a5b4ac79d606d79ac03f823a55c1f7a
tree531fb1b82c67e0768bd3c5ccea6504be1f5643bf
parente18f3e2be2164f29c7ab272b86ee25d6ed84f8b3
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.027332 seconds and 4 git commands to generate.