aboutsummaryrefslogtreecommitdiffstats
path: root/tests/fuzzy-test/fuzzytester.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-02-17 16:32:46 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-02-17 16:20:07 +0000
commit6ca299379fc1afd95c93b0199bc2899a1d90391c (patch)
tree7bf52dd9bbb0cf29f4b36fe38ab6a03536c567dd /tests/fuzzy-test/fuzzytester.cpp
parent3ff29a66b153c1a76d476ff91a26db931df5de89 (diff)
fuzzy-tester: Add ability to forward job count to qbs.
Change-Id: I45f275b448bd5660488faeed524c16085d2fa303 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'tests/fuzzy-test/fuzzytester.cpp')
-rw-r--r--tests/fuzzy-test/fuzzytester.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/fuzzy-test/fuzzytester.cpp b/tests/fuzzy-test/fuzzytester.cpp
index 4aee4193b..07fd8ffff 100644
--- a/tests/fuzzy-test/fuzzytester.cpp
+++ b/tests/fuzzy-test/fuzzytester.cpp
@@ -42,9 +42,10 @@ FuzzyTester::FuzzyTester()
}
void FuzzyTester::runTest(const QString &profile, const QString &startCommit,
- int maxDurationInMinutes)
+ int maxDurationInMinutes, int jobCount)
{
m_profile = profile;
+ m_jobCount = jobCount;
runGit(QStringList() << "rev-parse" << "HEAD", &m_headCommit);
qDebug("HEAD is %s", qPrintable(m_headCommit));
@@ -167,7 +168,11 @@ bool FuzzyTester::runQbs(const QString &buildDir, const QString &command, QStrin
if (errorOutput)
errorOutput->clear();
QProcess qbs;
- qbs.start("qbs", QStringList(command) << "-qq" << "-d" << buildDir << ("profile:" + m_profile));
+ QStringList commandLine = QStringList(command) << "-qq" << "-d" << buildDir;
+ if (m_jobCount != 0)
+ commandLine << "--jobs" << QString::number(m_jobCount);
+ commandLine << ("profile:" + m_profile);
+ qbs.start("qbs", commandLine);
if (!qbs.waitForStarted())
throw TestError("Failed to start qbs. It is expected to be in the PATH.");
if (!qbs.waitForFinished(-1) || qbs.exitCode() != 0) {