bt2: Adapt test_stream_class.py and make it pass
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 29 May 2019 14:28:55 +0000 (10:28 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 5 Jun 2019 17:47:34 +0000 (13:47 -0400)
commit3cdfbaeab23e6ed4268d606cb67c50ec9e8646a0
treed6469dec9c9ecb55b786e2826ab7d3733572123f
parent8c2367b884576ed438bc2e06cfc9205b2436838d
bt2: Adapt test_stream_class.py and make it pass

This patch updates test_stream_class.py quite a bit.  In particular, it
removes everything related to equality, copy and deep copy.  Since we
don't support (at least, for the moment) assigning stream class
properties after it has been created, most "assign" tests have become
"create" tests.

Stream class objects in Python are created using
TraceClass.create_stream_class.  This method has been introduced
previously to support TraceClass tests, but this patch now adds the
missing options.  Some field class creation methods are added to
TraceClass, just enough to support test_stream_class.

Changes in stream_class.py are mostly to adjust to past API changes.
The assigns_automatic_event_class_id property is new, everything related
to "header" field classes is removed.  Everything related to equality,
copy and deep copy is also removed.  The __call__ function is removed,
as it's not how create streams anymore (we use Trace.create_stream).

A new concept in the lib is that packet beginning/end messages may or
may not have a default clock snapshot, even if the stream has a default
clock class.  An option to TraceClass.create_stream_class is added for
this.

Changes to other files are there to support the tests, and not meant to
be complete.

Change-Id: Idd182d3f512f4f5772816fee0c04e2b39fd163f2
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/+/1291
Tested-by: jenkins
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
bindings/python/bt2/bt2/clock_class.py
bindings/python/bt2/bt2/component.py
bindings/python/bt2/bt2/event_class.py
bindings/python/bt2/bt2/field_class.py
bindings/python/bt2/bt2/native_bt_stream_class.i
bindings/python/bt2/bt2/stream_class.py
bindings/python/bt2/bt2/trace_class.py
tests/bindings/python/bt2/test_stream_class.py
This page took 0.027149 seconds and 4 git commands to generate.