tests: add `tests/utils/python/mctf.py`, a text to CTF trace generator
Add `mctf.py`, a utility to generate a test trace from a moultipart file
(see `moultipart.py`).
Any part having the header info `metadata` is written as-is in a file
named `metadata`. Other parts are considered Normand inputs, and the
output is written to a file of which the name is the exact header info
of the part. For example:
--- metadata
/* CTF 1.8 */
[...]
--- stream0
"Normand input here"
--- .index/stream0
"Normand input here too"
Variables and labels are carried from one normand.parse()
call to the other, allowing parts to refer to variables/labels from
previous parts.
All files are written relative to the value of the `--base-dir` option,
or relative to the current working directory if omitted. Any
nonexistent parent directory is created if needed (like `make -p`).
Add a function in `utils.sh that runs `mctf.py`.
Change-Id: I345b77ac382f268e8becd553e2e301982d80ced3
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11056
CI-Build: Simon Marchi <simon.marchi@efficios.com>
Tested-by: jenkins <jenkins@lttng.org>
This page took 0.024195 seconds and 4 git commands to generate.