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