forked from qt-creator/qt-creator
QtSupport: Use red color for failing test cases
We want them to stick out in the output pane. Change-Id: I2276c93301500fa67a3e23a61cde021b1993a247 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -302,7 +302,8 @@ void OutputFormatter::doAppendMessage(const QString &text, OutputFormat format)
|
||||
// then our formatting should reflect that redirection as well, i.e. print in red
|
||||
// even if the nominal format is stdout.
|
||||
if (!involvedParsers.isEmpty()) {
|
||||
const OutputFormat formatForParser = outputTypeForParser(involvedParsers.last(), format);
|
||||
const OutputFormat formatForParser = res.formatOverride
|
||||
? *res.formatOverride : outputTypeForParser(involvedParsers.last(), format);
|
||||
if (formatForParser != format && cleanLine == text && formattedText.length() == 1) {
|
||||
charFmt = charFormat(formatForParser);
|
||||
formattedText.first().format = charFmt;
|
||||
|
@@ -65,11 +65,13 @@ public:
|
||||
using LinkSpecs = QList<LinkSpec>;
|
||||
class Result {
|
||||
public:
|
||||
Result(Status s, const LinkSpecs &l = {}, const optional<QString> &c = {})
|
||||
: status(s), linkSpecs(l), newContent(c) {}
|
||||
Result(Status s, const LinkSpecs &l = {}, const optional<QString> &c = {},
|
||||
const optional<OutputFormat> &f = {})
|
||||
: status(s), linkSpecs(l), newContent(c), formatOverride(f) {}
|
||||
Status status;
|
||||
LinkSpecs linkSpecs;
|
||||
optional<QString> newContent; // Hard content override. Only to be used in extreme cases.
|
||||
optional<OutputFormat> formatOverride;
|
||||
};
|
||||
|
||||
static bool isLinkTarget(const QString &target);
|
||||
|
@@ -59,7 +59,7 @@ OutputLineParser::Result QtTestParser::handleLine(const QString &line, OutputFor
|
||||
emitCurrentTask();
|
||||
m_currentTask = Task(Task::Error, theLine, FilePath(), -1,
|
||||
Constants::TASK_CATEGORY_AUTOTEST);
|
||||
return Status::InProgress;
|
||||
return {Status::InProgress, {}, {}, StdErrFormat};
|
||||
}
|
||||
if (m_currentTask.isNull())
|
||||
return Status::NotHandled;
|
||||
|
Reference in New Issue
Block a user