add log binary data from UART. all Works
This commit is contained in:
@@ -16,7 +16,7 @@ void Logger::write(const QString& file, const QString& text)
|
||||
f.close();
|
||||
}
|
||||
|
||||
void Logger::saveTestLog(const QString& filename, const QJsonObject& cfg,
|
||||
void Logger::saveTestLog(const QString& filename, const QByteArray& rx, const QJsonObject& cfg,
|
||||
bool passed, QString& error, QString mismatches)
|
||||
{
|
||||
QString log;
|
||||
@@ -47,6 +47,11 @@ void Logger::saveTestLog(const QString& filename, const QJsonObject& cfg,
|
||||
log += "\n";
|
||||
}
|
||||
|
||||
log += "\n--- FULL LOG ---\n";
|
||||
|
||||
log += QString::fromUtf8(rx.toHex(' '));
|
||||
log += "\n";
|
||||
|
||||
log += "<<<TEST_END>>>\n";
|
||||
|
||||
write(filename, log);
|
||||
|
||||
@@ -18,7 +18,7 @@ public:
|
||||
const QString& error = "");
|
||||
|
||||
|
||||
static void saveTestLog(const QString& filename, const QJsonObject& cfg,
|
||||
static void saveTestLog(const QString& filename, const QByteArray &rx, const QJsonObject& cfg,
|
||||
bool passed, QString &error, QString mismatches);
|
||||
|
||||
static void appendSummary(
|
||||
|
||||
@@ -13,7 +13,7 @@ int main(int argc, char** argv)
|
||||
{
|
||||
QCoreApplication app(argc, argv);
|
||||
|
||||
printf("Embedded test stand. (Version 1.3, 25.05.2026)\n");
|
||||
printf("Embedded test stand. (Version 1.4, 29.05.2026)\n");
|
||||
|
||||
g_options = CLIParser::parse(argc, argv);
|
||||
|
||||
|
||||
@@ -549,7 +549,7 @@ bool UARTFixture::validateBinaryResponse(const QByteArray& rx, const QJsonObject
|
||||
if (!passed) { writeToLog(QString("%1\n%2").arg(err, errMsgMismatch) , false); break; }
|
||||
}
|
||||
|
||||
Logger::saveTestLog(logFile, cfg, passed, err, errMsgMismatch);
|
||||
Logger::saveTestLog(logFile, rx, cfg, passed, err, errMsgMismatch);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user