You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might be a bit too much to add unit test and most of the example code is already just in one main function. But we can add integration tests to ensure they not only build to actually run as well.
Maybe using a little python scripts, e.g.
test/examples/test_convert_osi2mcap.y
importsubprocessimporttempfileimportosfrompathlibimportPathdeftest_convert_osi2mcap():
withtempfile.TemporaryDirectory() astemp_dir:
# TODO Create test input OSI file, e.g. using writer # Run converter with different optionssubprocess.run([
"./convert_osi2mcap",
str(input_path),
str(output_path),
"--compression", "zstd",
"--chunk_size", "786432"
], check=True)
if__name__=="__main__":
test_convert_osi2mcap()
in the cmake
add_test(
NAME example_convert_osi2mcap
COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/examples/test_convert_osi2mcap.py
)
Additionally, this helps to "proof" that the examples are working in case someone new might face a local configuration error.
The text was updated successfully, but these errors were encountered:
Describe the feature
It might be a bit too much to add unit test and most of the example code is already just in one main function. But we can add integration tests to ensure they not only build to actually run as well.
Maybe using a little python scripts, e.g.
test/examples/test_convert_osi2mcap.y
in the cmake
Additionally, this helps to "proof" that the examples are working in case someone new might face a local configuration error.
The text was updated successfully, but these errors were encountered: