Add basic smoke test for MCAP converter
Grab the latest release of the "mcap" tool, which
includes a validator for MCAP files. Then
write a simple test that generates an AOS log,
converts it to MCAP, and tests that it is correct.
Change-Id: Ia2befa535405de1110810706b76f48782064da32
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/util/log_to_mcap.cc b/aos/util/log_to_mcap.cc
index 17555a4..49aca69 100644
--- a/aos/util/log_to_mcap.cc
+++ b/aos/util/log_to_mcap.cc
@@ -24,8 +24,9 @@
reader.Register();
const aos::Node *node =
- aos::configuration::GetNode(reader.configuration(), FLAGS_node);
- CHECK_NOTNULL(node);
+ FLAGS_node.empty()
+ ? nullptr
+ : aos::configuration::GetNode(reader.configuration(), FLAGS_node);
std::unique_ptr<aos::EventLoop> mcap_event_loop =
reader.event_loop_factory()->MakeEventLoop("mcap", node);
CHECK(!FLAGS_output_path.empty());