tests/tracing: use pytest_collect_file() hook for YAML files
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 10 Sep 2020 18:41:12 +0000 (14:41 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Thu, 10 Sep 2020 18:41:12 +0000 (14:41 -0400)
commit816fefd3b69dc9f18156eff586848b1b2f6d8c7f
treeedfbc0cc1947b670d64bab10251713c83cc77fa9
parentb1c5cbcf3b6196cac7a813507b31c11190fef4f4
tests/tracing: use pytest_collect_file() hook for YAML files

This patch applies the same strategy as b1c5cbc ("tests/config/yaml: use
pytest_collect_file() hook for YAML files") to `tests/tracing`.

This patch changes `tests/tracing/conftest.py` so that it implements a
pytest_collect_file() Pytest hook to create Pytest file and item objects
for each barectf YAML configuration file found in the `configs`
directory. Thanks to the base name of this YAML file,
pytest_collect_file() automatically finds the corresponding
test-specific C source and expectation files.

This makes is possible to remove `test_succeed_static_array.py` and
avoid duplication and mismatches between existing YAML files and
available test functions.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
tests/tracing/conftest.py
tests/tracing/test_succeed_static_array.py [deleted file]
This page took 0.023601 seconds and 4 git commands to generate.