forked from qt-creator/qt-creator
Build valgrind-fake on Windows
Change-Id: If6252f9a252e9bb0626ec60bdf34fa82cda09bfa Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
afbf8bd2f7
commit
bdf89d1cbd
@@ -3,13 +3,12 @@ TEMPLATE = subdirs
|
||||
SUBDIRS = qtpromaker \
|
||||
qmlpuppet \
|
||||
../plugins/cpaster/frontend \
|
||||
sdktool
|
||||
sdktool \
|
||||
valgrindfake
|
||||
|
||||
win32 {
|
||||
SUBDIRS += qtcdebugger
|
||||
SUBDIRS += wininterrupt
|
||||
} else {
|
||||
SUBDIRS += valgrindfake
|
||||
}
|
||||
|
||||
QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH)
|
||||
|
@@ -71,12 +71,12 @@ int main(int argc, char** argv)
|
||||
uint arg_wait = 0;
|
||||
|
||||
const QProcessEnvironment sysEnv = QProcessEnvironment::systemEnvironment();
|
||||
arg_xmlFile = sysEnv.value("QCIT_INPUT_FILE");
|
||||
arg_xmlFile = sysEnv.value(QLatin1String("QCIT_INPUT_FILE"));
|
||||
|
||||
for (int i = 1; i < args.size(); ++i) {
|
||||
const QString& arg = args.at(i);
|
||||
if (arg.startsWith(QLatin1String("--xml-socket="))) {
|
||||
arg_server = arg.mid(13, arg.indexOf(':') - 13);
|
||||
arg_server = arg.mid(13, arg.indexOf(QLatin1Char(':')) - 13);
|
||||
arg_port = arg.mid(13 + arg_server.length() + 1);
|
||||
} else if (args.size() > i + 1
|
||||
&& (args.at(i) == QLatin1String("-i")
|
||||
|
@@ -30,6 +30,8 @@
|
||||
|
||||
#include "outputgenerator.h"
|
||||
|
||||
#include <utils/sleep.h>
|
||||
|
||||
#include <QAbstractSocket>
|
||||
#include <QIODevice>
|
||||
#include <QTextStream>
|
||||
@@ -37,8 +39,6 @@
|
||||
#include <QStringList>
|
||||
#include <QDebug>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
using namespace Valgrind::Fake;
|
||||
|
||||
OutputGenerator::OutputGenerator(QAbstractSocket *output, QIODevice *input) :
|
||||
@@ -104,7 +104,7 @@ void OutputGenerator::produceRuntimeError()
|
||||
m_output->flush();
|
||||
} else if (m_wait) {
|
||||
qDebug() << "waiting in fake valgrind for " << m_wait << " seconds..." << endl;
|
||||
sleep(m_wait);
|
||||
Utils::sleep(1000 * m_wait);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -10,3 +10,7 @@ isEmpty(PRECOMPILED_HEADER):PRECOMPILED_HEADER = $$PWD/../../shared/qtcreator_pc
|
||||
HEADERS += outputgenerator.h
|
||||
SOURCES += main.cpp \
|
||||
outputgenerator.cpp
|
||||
|
||||
QTC_LIB_DEPENDS += \
|
||||
utils
|
||||
include(../../../qtcreator.pri)
|
||||
|
@@ -3,8 +3,8 @@ import qbs
|
||||
CppApplication {
|
||||
name: "valgrind-fake"
|
||||
type: "application"
|
||||
condition: qbs.targetOS.contains("unix")
|
||||
destinationDirectory: project.ide_bin_path
|
||||
Depends { name: "Utils" }
|
||||
Depends { name: "Qt"; submodules: ["network", "xml"]; }
|
||||
files: [
|
||||
"main.cpp",
|
||||
|
@@ -15,11 +15,8 @@ SUBDIRS += \
|
||||
qtcprocess \
|
||||
utils \
|
||||
utils_stringutils \
|
||||
filesearch
|
||||
|
||||
!win32 {
|
||||
SUBDIRS += valgrind
|
||||
}
|
||||
filesearch \
|
||||
valgrind
|
||||
|
||||
#contains (QT_CONFIG, declarative) {
|
||||
#SUBDIRS += qml
|
||||
|
@@ -2,7 +2,7 @@ import qbs
|
||||
|
||||
Project {
|
||||
name: "Valgrind autotests"
|
||||
condition: qbs.targetOS.contains("unix")
|
||||
condition: qbs.targetOS.contains("unix") // FIXME: doesn't link on Windows
|
||||
references: [
|
||||
"callgrind/callgrind.qbs",
|
||||
"memcheck/memcheck.qbs"
|
||||
|
Reference in New Issue
Block a user