bt2: Adapt test_port.py and make it pass
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 8 May 2019 18:00:05 +0000 (14:00 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:21 +0000 (17:24 -0400)
commitbc5c9924b33eea71cfc4838dc11309c376efb464
tree54bcb6754a110a8898cb19aef03c6c78e4c612c8
parentd1c79517958e83c4faaf89b67b7a3ec9aeef8a51
bt2: Adapt test_port.py and make it pass

This patch does the essential to make test_port.py pass.

Everything related to equality between ports was removed from
test_port.py, as we decided that it was not particularly useful.
Everything related to disconnection of ports and removal of ports from
components was also removed, since these concepts don't exist in
Babeltrace anymore.

I have also removed the possibility of getting a component from a port.
This was the only place where an explicit downcast from bt_component to
the specific component type would have been necessary.  Instead, we have
concluded that every time you have access to the port, you already have
access to its component, already with the right type.

The possibility to create an output message iterator from an output port
is also removed, that operation will be done from a graph instead.

The other notable changes in the bindings are:

- Graph: Change add_sink_component to add_component, and handle the
  various component types.
- Port: Simple adaptations to the current API, using the now famous pattern
  of _as_*_ptr static methods.
- Component: Adjust how ports are listed and iterated on to account for
  changes in the API.

Change-Id: Iee42bb4f8508e08d7f2b2cca451cae05d52a0ed0
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/+/1279
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
Tested-by: jenkins
bindings/python/bt2/bt2/__init__.py.in
bindings/python/bt2/bt2/component.py
bindings/python/bt2/bt2/graph.py
bindings/python/bt2/bt2/port.py
tests/bindings/python/bt2/test_component.py
tests/bindings/python/bt2/test_component_class.py
tests/bindings/python/bt2/test_port.py
This page took 0.025677 seconds and 4 git commands to generate.