bt2: Adapt test_trace.py and make it pass
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 9 May 2019 19:28:15 +0000 (15:28 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:21 +0000 (17:24 -0400)
commitf377a958041f678a13b22350566ba347a6b50b6e
tree9dfa2c9e467eca848cda32383d6630b337ecd0ba
parent0bee8ea9e637885efff12a157ff2116fb5f2f0cc
bt2: Adapt test_trace.py and make it pass

test_trace.py is heavily modified, because most of the responsibilities
of Trace have been moved to TraceClass.  A number of concepts, such as
packet headers, also disappeared.

Similarly, trace.py loses a lot of weight.  Note that copy and equality
operations are removed, since we ruled that they were complex but not
particularly useful.

A trace implements abc.Mapping, and maps stream ids to stream objects.

A trace is created by "calling" a trace class, hence the addition of the
__call__ method to TraceClass.

The test_trace test creates some streams and requires to control the ids
of those streams, so the create_stream_class method and StreamClass type
are enhanced to support that.

Change-Id: If23089abfbcbe5f0064069f93bd91126f1549b62
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/+/1290
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
bindings/python/bt2/bt2/stream.py
bindings/python/bt2/bt2/stream_class.py
bindings/python/bt2/bt2/trace.py
bindings/python/bt2/bt2/trace_class.py
tests/bindings/python/bt2/Makefile.am
tests/bindings/python/bt2/test_trace.py
This page took 0.025391 seconds and 4 git commands to generate.