Valgrind: Fix Qbs build

Change-Id: I67e0b3baa68589eec58d407e6886f51866cfa275
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Stenger
2016-12-19 09:09:46 +01:00
parent 6c4840a4ff
commit e1d339b72c
2 changed files with 12 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import qbs 1.0
import qbs
import qbs.FileInfo
QtcPlugin {
name: "Valgrind"
@@ -98,5 +99,11 @@ QtcPlugin {
"valgrindtestrunnertest.cpp",
"valgrindtestrunnertest.h",
]
cpp.defines: outer.concat([
'PARSERTESTS_DATA_DIR="' + FileInfo.joinPaths(path, "unit_testdata") + '"',
'VALGRIND_FAKE_PATH="' + FileInfo.joinPaths(project.buildDirectory, qtc.ide_bin_path) + '"',
'TESTRUNNER_SRC_DIR="' + FileInfo.joinPaths(path, "../../../tests/auto/valgrind/memcheck/testapps") + '"',
'TESTRUNNER_APP_DIR="' + FileInfo.joinPaths(project.buildDirectory, qtc.ide_bin_path, "testapps") + '"'
])
}
}

View File

@@ -89,6 +89,10 @@ static QString fakeValgrindExecutable()
if (fi.exists())
return fi.canonicalFilePath();
fi = QFileInfo(QString(valgrindFakePath + "/release"), "valgrind-fake.exe");
if (fi.exists())
return fi.canonicalFilePath();
// Qbs uses the install-root/bin
fi = QFileInfo(valgrindFakePath, "valgrind-fake.exe");
if (fi.exists())
return fi.canonicalFilePath();
qFatal("Neither debug nor release build valgrind-fake found.");