tests/.../data_from_mp.py: add CTF 2 support
This patch changes `tests/data/plugins/src.ctf.fs/field/data_from_mp.py`
to add CTF 2 support.
The script generates a CTF 2 trace when the stripped field class text
starts with `{` (full field class) or `"` (field class alias), which are
exclusive to the CTF 2 metadata syntax (any CTF 1.8 field class starts
with some keyword).
The same automatic field class aliases as the CTF 1.8 case
are available.
_make_ctf_2_metadata() doesn't need the `@` replacement trick of
_make_ctf_1_metadata() because CTF 2 array field classes aren't
different from any CTF 2 field class, for example:
{
"type": "static-length-array",
"length": 4,
"element-field-class": "u8"
}
vs.
u8 @[4]
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I6abe0776c64fde62633cfc7a89094c0aedf6b9be
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12770
This page took 0.023965 seconds and 4 git commands to generate.