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 "qttestresult.h"
|
||||||
#include "../testtreeitem.h"
|
#include "../testtreeitem.h"
|
||||||
|
|
||||||
|
#include <qtsupport/qtoutputformatter.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@@ -355,8 +356,8 @@ void QtTestOutputReader::processPlainTextOutput(const QByteArray &outputLineWith
|
|||||||
"|INFO |QWARN |WARNING|QDEBUG |QSYSTEM): (.*)$");
|
"|INFO |QWARN |WARNING|QDEBUG |QSYSTEM): (.*)$");
|
||||||
|
|
||||||
static QRegExp benchDetails("^\\s+([\\d,.]+ .* per iteration \\(total: [\\d,.]+, iterations: \\d+\\))$");
|
static QRegExp benchDetails("^\\s+([\\d,.]+ .* per iteration \\(total: [\\d,.]+, iterations: \\d+\\))$");
|
||||||
static QRegExp locationUnix("^ Loc: \\[(.*)\\]$");
|
static QRegExp locationUnix(QT_TEST_FAIL_UNIX_REGEXP);
|
||||||
static QRegExp locationWin("^(.*\\(\\d+\\)) : failure location$");
|
static QRegExp locationWin(QT_TEST_FAIL_WIN_REGEXP);
|
||||||
|
|
||||||
if (m_futureInterface.isCanceled())
|
if (m_futureInterface.isCanceled())
|
||||||
return;
|
return;
|
||||||
|
@@ -44,24 +44,21 @@ using namespace Utils;
|
|||||||
|
|
||||||
namespace QtSupport {
|
namespace QtSupport {
|
||||||
|
|
||||||
// "file" or "qrc", colon, optional '//', '/' and further characters
|
|
||||||
#define QML_URL_REGEXP "(?:file|qrc):(?://)?/.+"
|
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class QtOutputFormatterPrivate
|
class QtOutputFormatterPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QtOutputFormatterPrivate(Project *proj)
|
QtOutputFormatterPrivate(Project *proj)
|
||||||
: qmlError("(" QML_URL_REGEXP // url
|
: qmlError("(" QT_QML_URL_REGEXP // url
|
||||||
":\\d+" // colon, line
|
":\\d+" // colon, line
|
||||||
"(?::\\d+)?)" // colon, column (optional)
|
"(?::\\d+)?)" // colon, column (optional)
|
||||||
"[: \t)]") // colon, space, tab or brace
|
"[: \t)]") // colon, space, tab or brace
|
||||||
, qtError("Object::.*in (.*:\\d+)")
|
, qtError("Object::.*in (.*:\\d+)")
|
||||||
, qtAssert("ASSERT: .* in file (.+, line \\d+)")
|
, qtAssert(QT_ASSERT_REGEXP)
|
||||||
, qtAssertX("ASSERT failure in .*: \".*\", file (.+, line \\d+)")
|
, qtAssertX(QT_ASSERT_X_REGEXP)
|
||||||
, qtTestFailUnix("^ Loc: \\[(.*)\\]")
|
, qtTestFailUnix(QT_TEST_FAIL_UNIX_REGEXP)
|
||||||
, qtTestFailWin("^(.*\\(\\d+\\)) : failure location\\s*$")
|
, qtTestFailWin(QT_TEST_FAIL_WIN_REGEXP)
|
||||||
, project(proj)
|
, project(proj)
|
||||||
{
|
{
|
||||||
qmlError.setMinimal(true);
|
qmlError.setMinimal(true);
|
||||||
@@ -213,7 +210,7 @@ void QtOutputFormatter::appendLine(const LinkResult &lr, const QString &line,
|
|||||||
void QtOutputFormatter::handleLink(const QString &href)
|
void QtOutputFormatter::handleLink(const QString &href)
|
||||||
{
|
{
|
||||||
if (!href.isEmpty()) {
|
if (!href.isEmpty()) {
|
||||||
QRegExp qmlLineColumnLink("^(" QML_URL_REGEXP ")" // url
|
QRegExp qmlLineColumnLink("^(" QT_QML_URL_REGEXP ")" // url
|
||||||
":(\\d+)" // line
|
":(\\d+)" // line
|
||||||
":(\\d+)$"); // column
|
":(\\d+)$"); // column
|
||||||
|
|
||||||
@@ -227,7 +224,7 @@ void QtOutputFormatter::handleLink(const QString &href)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRegExp qmlLineLink("^(" QML_URL_REGEXP ")" // url
|
QRegExp qmlLineLink("^(" QT_QML_URL_REGEXP ")" // url
|
||||||
":(\\d+)$"); // line
|
":(\\d+)$"); // line
|
||||||
|
|
||||||
if (qmlLineLink.indexIn(href) != -1) {
|
if (qmlLineLink.indexIn(href) != -1) {
|
||||||
|
@@ -29,6 +29,13 @@
|
|||||||
|
|
||||||
#include <utils/outputformatter.h>
|
#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 ProjectExplorer { class Project; }
|
||||||
|
|
||||||
namespace QtSupport {
|
namespace QtSupport {
|
||||||
|
Reference in New Issue
Block a user