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