forked from qt-creator/qt-creator
Use the same regex pattern for Autotest and QtSupport
Change-Id: I67e969da2b785ceeb501ec0bb61d67b8f973edca Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
committed by
André Hartmann
parent
dd366b68de
commit
3cc6db090f
@@ -27,6 +27,7 @@
|
||||
#include "qttestresult.h"
|
||||
#include "../testtreeitem.h"
|
||||
|
||||
#include <qtsupport/qtoutputformatter.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
#include <QDir>
|
||||
@@ -355,8 +356,8 @@ void QtTestOutputReader::processPlainTextOutput(const QByteArray &outputLineWith
|
||||
"|INFO |QWARN |WARNING|QDEBUG |QSYSTEM): (.*)$");
|
||||
|
||||
static QRegExp benchDetails("^\\s+([\\d,.]+ .* per iteration \\(total: [\\d,.]+, iterations: \\d+\\))$");
|
||||
static QRegExp locationUnix("^ Loc: \\[(.*)\\]$");
|
||||
static QRegExp locationWin("^(.*\\(\\d+\\)) : failure location$");
|
||||
static QRegExp locationUnix(QT_TEST_FAIL_UNIX_REGEXP);
|
||||
static QRegExp locationWin(QT_TEST_FAIL_WIN_REGEXP);
|
||||
|
||||
if (m_futureInterface.isCanceled())
|
||||
return;
|
||||
|
@@ -44,24 +44,21 @@ using namespace Utils;
|
||||
|
||||
namespace QtSupport {
|
||||
|
||||
// "file" or "qrc", colon, optional '//', '/' and further characters
|
||||
#define QML_URL_REGEXP "(?:file|qrc):(?://)?/.+"
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class QtOutputFormatterPrivate
|
||||
{
|
||||
public:
|
||||
QtOutputFormatterPrivate(Project *proj)
|
||||
: qmlError("(" QML_URL_REGEXP // url
|
||||
: qmlError("(" QT_QML_URL_REGEXP // url
|
||||
":\\d+" // colon, line
|
||||
"(?::\\d+)?)" // colon, column (optional)
|
||||
"[: \t)]") // colon, space, tab or brace
|
||||
, qtError("Object::.*in (.*:\\d+)")
|
||||
, qtAssert("ASSERT: .* in file (.+, line \\d+)")
|
||||
, qtAssertX("ASSERT failure in .*: \".*\", file (.+, line \\d+)")
|
||||
, qtTestFailUnix("^ Loc: \\[(.*)\\]")
|
||||
, qtTestFailWin("^(.*\\(\\d+\\)) : failure location\\s*$")
|
||||
, qtAssert(QT_ASSERT_REGEXP)
|
||||
, qtAssertX(QT_ASSERT_X_REGEXP)
|
||||
, qtTestFailUnix(QT_TEST_FAIL_UNIX_REGEXP)
|
||||
, qtTestFailWin(QT_TEST_FAIL_WIN_REGEXP)
|
||||
, project(proj)
|
||||
{
|
||||
qmlError.setMinimal(true);
|
||||
@@ -213,7 +210,7 @@ void QtOutputFormatter::appendLine(const LinkResult &lr, const QString &line,
|
||||
void QtOutputFormatter::handleLink(const QString &href)
|
||||
{
|
||||
if (!href.isEmpty()) {
|
||||
QRegExp qmlLineColumnLink("^(" QML_URL_REGEXP ")" // url
|
||||
QRegExp qmlLineColumnLink("^(" QT_QML_URL_REGEXP ")" // url
|
||||
":(\\d+)" // line
|
||||
":(\\d+)$"); // column
|
||||
|
||||
@@ -227,7 +224,7 @@ void QtOutputFormatter::handleLink(const QString &href)
|
||||
return;
|
||||
}
|
||||
|
||||
QRegExp qmlLineLink("^(" QML_URL_REGEXP ")" // url
|
||||
QRegExp qmlLineLink("^(" QT_QML_URL_REGEXP ")" // url
|
||||
":(\\d+)$"); // line
|
||||
|
||||
if (qmlLineLink.indexIn(href) != -1) {
|
||||
|
@@ -29,6 +29,13 @@
|
||||
|
||||
#include <utils/outputformatter.h>
|
||||
|
||||
// "file" or "qrc", colon, optional '//', '/' and further characters
|
||||
#define QT_QML_URL_REGEXP "(?:file|qrc):(?://)?/.+"
|
||||
#define QT_ASSERT_REGEXP "ASSERT: .* in file (.+, line \\d+)"
|
||||
#define QT_ASSERT_X_REGEXP "ASSERT failure in .*: \".*\", file (.+, line \\d+)"
|
||||
#define QT_TEST_FAIL_UNIX_REGEXP "^ Loc: \\[(.*)\\]$"
|
||||
#define QT_TEST_FAIL_WIN_REGEXP "^(.*\\(\\d+\\)) : failure location\\s*$"
|
||||
|
||||
namespace ProjectExplorer { class Project; }
|
||||
|
||||
namespace QtSupport {
|
||||
|
Reference in New Issue
Block a user