cabana: add test case for parsing all opendbc files (#30584)
* test opendbc files * bump opendbc * bump opendbc --------- Co-authored-by: Shane Smiskol <shane@smiskol.com> old-commit-hash: 33ee7530b39bf01051c11cb888695b0962c92f95
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
|
||||
#undef INFO
|
||||
#include <QDir>
|
||||
|
||||
#include "catch2/catch.hpp"
|
||||
#include "tools/replay/logreader.h"
|
||||
#include "tools/cabana/dbc/dbcmanager.h"
|
||||
@@ -85,3 +87,17 @@ CM_ SG_ 160 signal_2 "multiple line comment
|
||||
REQUIRE(msg->sigs[1]->size == 1);
|
||||
REQUIRE(msg->sigs[1]->receiver_name == "XXX");
|
||||
}
|
||||
|
||||
TEST_CASE("parse_opendbc") {
|
||||
QDir dir(OPENDBC_FILE_PATH);
|
||||
QStringList errors;
|
||||
for (auto fn : dir.entryList({"*.dbc"}, QDir::Files, QDir::Name)) {
|
||||
try {
|
||||
auto dbc = DBCFile(dir.filePath(fn));
|
||||
} catch (std::exception &e) {
|
||||
errors.push_back(e.what());
|
||||
}
|
||||
}
|
||||
INFO(errors.join("\n").toStdString());
|
||||
REQUIRE(errors.empty());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user