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)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Jun 2019 21:24:21 +0000 (17:24 -0400)
commit060aee52aea75e75c1387aeb9df1643fd33ddc50
treee88319201af91075e369b9c0eb302acd5ff9d303
parentf377a958041f678a13b22350566ba347a6b50b6e
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.025921 seconds and 4 git commands to generate.