Commit e6c0c292 authored by Christian Stenger's avatar Christian Stenger Committed by hjk

tests: move valgrind into auto tests

* re-added some test data files
* added QSKIP for not existing data files

Change-Id: Ie0ae3f563e0d94534b620320176b7ec56e36d313
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent f1b35856
......@@ -14,7 +14,8 @@ SUBDIRS += \
qtcprocess \
utils \
utils_stringutils \
filesearch
filesearch \
valgrind
#contains (QT_CONFIG, declarative) {
#SUBDIRS += qml
......
......@@ -11,5 +11,5 @@ cd valgrind-test
export LD_LIBRARY_PATH=/path/to/qtc-build/lib/qtcreator:/path/to/qtc-build/lib/qtcreator/plugins/QtProject
# run qmake, make
qmake CONFIG+=debug IDE_BUILD_TREE=$(readlink -f ..) ../../path/to/qtc/tests/valgrind
qmake CONFIG+=debug IDE_BUILD_TREE=$(readlink -f ..) ../../path/to/qtc/tests/auto/valgrind
make
include(../../auto/qttest.pri)
include(../../qttest.pri)
include($$IDE_SOURCE_TREE/src/plugins/valgrind/valgrind_test.pri)
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
include($$IDE_SOURCE_TREE/src/libs/ssh/ssh.pri)
TARGET = callgrindparsertests
TARGET = tst_callgrindparsertests
DEFINES += "PARSERTESTS_DATA_DIR=\\\"$$PWD/data\\\""
DEFINES += "PARSERTESTS_DATA_DIR=\\\"$$_PRO_FILE_PWD_/data\\\""
#enable extra debugging code
DEFINES += "CALLGRINDPARSERTESTS"
......
......@@ -226,7 +226,7 @@ int main(int argc, char *argv[])
calleeDock->setWidget(handler->calleesView());
window.addDockWidget(Qt::RightDockWidgetArea, calleeDock);
QDockWidget *widgetDock = new QDockWidget("visualisation", &window);
QDockWidget *widgetDock = new QDockWidget("vizualisation", &window);
widgetDock->setWidget(handler->visualisation());
window.addDockWidget(Qt::BottomDockWidgetArea, widgetDock);
......
This diff is collapsed.
This diff is collapsed.
......@@ -44,7 +44,7 @@ using namespace Valgrind::XmlProtocol;
static QString fakeValgrindExecutable()
{
return QCoreApplication::applicationDirPath() + QLatin1String("/../../valgrind-fake/valgrind-fake");
return QLatin1String(VALGRIND_FAKE_PATH);
}
static QString dataFile(const QLatin1String &file)
......
include(../../../qtcreator.pri)
include(../../auto/qttestrpath.pri)
include(../../../../qtcreator.pri)
include(../../qttestrpath.pri)
include($$IDE_SOURCE_TREE/src/libs/3rdparty/botan/botan.pri)
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
include($$IDE_SOURCE_TREE/src/libs/ssh/ssh.pri)
include($$IDE_SOURCE_TREE/src/plugins/valgrind/valgrind_test.pri)
......@@ -12,7 +13,7 @@ macx:CONFIG -= app_bundle
QT += gui network
DEFINES += "PARSERTESTS_DATA_DIR=\\\"$$PWD/data\\\""
DEFINES += "VALGRIND_FAKE_PATH=\\\"$$IDE_BUILD_TREE/src/tools/valgrindfake/valgrind-fake\\\""
SOURCES += modeldemo.cpp
......
......@@ -48,6 +48,12 @@
#include <iostream>
#include <QProcess>
#if QT_VERSION >= 0x050000
#define MSKIP_SINGLE(x) QSKIP(x)
#else
#define MSKIP_SINGLE(x) QSKIP(x, SkipSingle)
#endif
using namespace Valgrind;
using namespace Valgrind::XmlProtocol;
......@@ -143,6 +149,8 @@ void ParserTests::cleanup()
void ParserTests::testHelgrindSample1()
{
MSKIP_SINGLE("testfile does not exist");
initTest(QLatin1String("helgrind-output-sample1.xml"));
QList<Error> expectedErrors;
......@@ -313,6 +321,8 @@ void ParserTests::testMemcheckSample1()
void ParserTests::testMemcheckSample2()
{
MSKIP_SINGLE("testfile does not exist");
initTest(QLatin1String("memcheck-output-sample2.xml"));
Valgrind::XmlProtocol::Parser parser;
......@@ -337,6 +347,8 @@ void ParserTests::testMemcheckSample2()
void ParserTests::testMemcheckSample3()
{
MSKIP_SINGLE("testfile does not exist");
initTest(QLatin1String("memcheck-output-sample3.xml"));
Valgrind::XmlProtocol::Parser parser;
......@@ -387,8 +399,10 @@ void ParserTests::testMemcheckSample3()
void ParserTests::testMemcheckCharm()
{
MSKIP_SINGLE("testfile does not exist");
// a somewhat larger file, to make sure buffering and partial I/O works ok
initTest(QLatin1String("memcheck-output-charm.xml"));
initTest(QLatin1String("memcheck-output-untitled.xml"));
Valgrind::XmlProtocol::Parser parser;
Recorder rec(&parser);
......
......@@ -76,9 +76,9 @@ public Q_SLOTS:
errors.append(err);
}
void errorCount(qint64 uniq, qint64 count)
void errorCount(qint64 unique, qint64 count)
{
errorcounts.push_back(qMakePair(uniq, count));
errorcounts.push_back(qMakePair(unique, count));
}
void suppressionCount(const QString &name, qint64 count)
......
include(../../auto/qttest.pri)
include(../../qttest.pri)
include($$IDE_SOURCE_TREE/src/libs/3rdparty/botan/botan.pri)
include($$IDE_SOURCE_TREE/src/libs/ssh/ssh.pri)
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
include($$IDE_SOURCE_TREE/src/plugins/valgrind/valgrind_test.pri)
TARGET = parsertests
TARGET = tst_parsertests
QT += network
DEFINES += "PARSERTESTS_DATA_DIR=\\\"$$PWD/data\\\""
DEFINES += "PARSERTESTS_DATA_DIR=\\\"$$_PRO_FILE_PWD_/data\\\""
DEFINES += "VALGRIND_FAKE_PATH=\\\"$$IDE_BUILD_TREE/src/tools/valgrindfake/valgrind-fake\\\""
SOURCES += parsertests.cpp
......
......@@ -56,7 +56,7 @@ using namespace Valgrind;
using namespace Valgrind::XmlProtocol;
using namespace Valgrind::Memcheck;
//BEGIN Test Helpers and boilterplate code
//BEGIN Test Helpers and boilerplate code
TestRunner::TestRunner(QObject *parent)
: QObject(parent),
......
include(../../auto/qttest.pri)
include(../../qttest.pri)
include($$IDE_SOURCE_TREE/src/libs/utils/utils.pri)
include($$IDE_SOURCE_TREE/src/libs/ssh/ssh.pri)
include($$IDE_SOURCE_TREE/src/plugins/valgrind/valgrind_test.pri)
TARGET = testrunner
TARGET = tst_testrunner
DEFINES += "TESTRUNNER_SRC_DIR=\\\"$$_PRO_FILE_PWD_/testapps\\\""
DEFINES += "TESTRUNNER_APP_DIR=\\\"$(PWD)/testapps\\\""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment