diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-02-23 15:35:04 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-27 20:52:45 +0100 |
commit | edde6152094702aa4c3415920d2c962009619743 (patch) | |
tree | 3fd27faa9df153c80a01f9f8a45c2cf9f97b68ab /tests/auto/tools/qmake/testcompiler.cpp | |
parent | 091dd54a6c145c477ade2b910519fc4d6d0e3591 (diff) |
TestCompiler: split commands from arguments
this allows us to temporarily set some extra args without (incorrectly)
instantiating a second TestCompiler (and on the way relying on $PATH for
finding qmake).
Change-Id: Icce5bf7314148ddbe705606f77a26e3362b31f67
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'tests/auto/tools/qmake/testcompiler.cpp')
-rw-r--r-- | tests/auto/tools/qmake/testcompiler.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/auto/tools/qmake/testcompiler.cpp b/tests/auto/tools/qmake/testcompiler.cpp index d2cb9f2435..8864d4d435 100644 --- a/tests/auto/tools/qmake/testcompiler.cpp +++ b/tests/auto/tools/qmake/testcompiler.cpp @@ -160,6 +160,18 @@ void TestCompiler::setBaseCommands( QString makeCmd, QString qmakeCmd ) qmakeCmd_ = qmakeCmd; } +void TestCompiler::resetArguments() +{ + makeArgs_.clear(); + qmakeArgs_.clear(); +} + +void TestCompiler::setArguments( QString makeArgs, QString qmakeArgs ) +{ + makeArgs_ = makeArgs; + qmakeArgs_ = qmakeArgs; +} + void TestCompiler::resetEnvironment() { environment_.clear(); @@ -222,7 +234,7 @@ bool TestCompiler::qmake( const QString &workDir, const QString &proName, const makeFile += "Makefile"; // Now start qmake and generate the makefile - return runCommand( qmakeCmd_ + " " + projectFile + " -o " + makeFile ); + return runCommand( qmakeCmd_ + " " + qmakeArgs_ + " " + projectFile + " -o " + makeFile ); } bool TestCompiler::make( const QString &workPath, const QString &target ) @@ -230,7 +242,7 @@ bool TestCompiler::make( const QString &workPath, const QString &target ) QDir D; D.setCurrent( workPath ); - QString cmdline = makeCmd_; + QString cmdline = makeCmd_ + " " + makeArgs_; if ( cmdline.contains("nmake", Qt::CaseInsensitive) ) cmdline.append(" /NOLOGO"); if ( !target.isEmpty() ) |