1. parser binary data get info about structure from elf and test_case.json. 2. Rewrite runCase. All works

This commit is contained in:
2026-05-20 15:15:42 +03:00
parent 82987e0f7b
commit 10b631bc07
8 changed files with 563 additions and 439 deletions

View File

@@ -16,6 +16,43 @@ void Logger::write(const QString& file, const QString& text)
f.close();
}
void Logger::saveTestLog(const QString& filename, const QJsonObject& cfg,
bool passed, QString& error, QString mismatches)
{
QString log;
log += "\n<<<TEST_START>>>\n";
log += "TEST: ";
log += cfg["meta"].toObject()["name"].toString();
log += "\n";
log += "TIME: ";
log += QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss");
log += "\n";
log += passed ? "STATUS: PASS\n" : "STATUS: FAIL\n";
if (!error.isEmpty())
{
log += "\n--- ERROR ---\n";
log += error;
log += "\n";
}
if (!mismatches.isEmpty())
{
log += "\n--- MISMATCHES ---\n";
log += mismatches;
log += "\n";
}
log += "<<<TEST_END>>>\n";
write(filename, log);
}
void Logger::saveTestLog(
const QString& filename,
const ProtocolHandler& handler,