Tests: Fix sdktool test

Change-Id: Idc21354d3f546c1aaff7d1481c80190c6c1c366c
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Christian Stenger
2015-11-26 17:56:55 +01:00
parent f7ab95247b
commit ce2a891c48
3 changed files with 5 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
include(../qttest.pri)
DEFINES += "SDKTOOL_DIR=\\\"$$IDE_LIBEXEC_PATH\\\""
SOURCES += tst_sdktool.cpp

View File

@@ -7,4 +7,6 @@ QtcAutotest {
name: "Test sources"
files: "tst_sdktool.cpp"
}
cpp.defines: base.concat(['SDKTOOL_DIR="' + qbs.installRoot + '/' + project.ide_libexec_path + '"'])
}

View File

@@ -43,11 +43,7 @@ private slots:
void SdktoolTest::testSdktool()
{
QDir rootDir = QCoreApplication::applicationDirPath();
rootDir.cdUp();
rootDir.cdUp();
rootDir.cdUp();
rootDir.cd(QLatin1String("bin"));
QDir rootDir(SDKTOOL_DIR);
QProcess process;
process.start(rootDir.absoluteFilePath(QLatin1String("sdktool")),
QStringList() << QLatin1String("-test"));