forked from qt-creator/qt-creator
AutoTest: Allow arguments for test runs
Arguments specified for run configurations were ignored so far, but sometimes it might help to process them. Add the possibility and a respective setting to be able to pass arguments to the test run. Task-number: QTCREATORBUG-17630 Change-Id: Ie64b784e8477efa02f50ce6b4cf3e55864952880 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
@@ -27,7 +27,10 @@
|
||||
#include "qttestconstants.h"
|
||||
#include "qttestoutputreader.h"
|
||||
#include "qttestsettings.h"
|
||||
#include "qttest_utils.h"
|
||||
#include "../autotestplugin.h"
|
||||
#include "../testframeworkmanager.h"
|
||||
#include "../testsettings.h"
|
||||
|
||||
namespace Autotest {
|
||||
namespace Internal {
|
||||
@@ -48,12 +51,17 @@ TestOutputReader *QtTestConfiguration::outputReader(const QFutureInterface<TestR
|
||||
return new QtTestOutputReader(fi, app, buildDirectory(), QtTestOutputReader::PlainText);
|
||||
}
|
||||
|
||||
QStringList QtTestConfiguration::argumentsForTestRunner() const
|
||||
QStringList QtTestConfiguration::argumentsForTestRunner(QStringList *omitted) const
|
||||
{
|
||||
static const Core::Id id
|
||||
= Core::Id(Constants::FRAMEWORK_PREFIX).withSuffix(QtTest::Constants::FRAMEWORK_NAME);
|
||||
|
||||
QStringList arguments;
|
||||
if (AutotestPlugin::instance()->settings()->processArgs) {
|
||||
arguments.append(QTestUtils::filterInterfering(
|
||||
runnable().commandLineArguments.split(' ', QString::SkipEmptyParts),
|
||||
omitted, false));
|
||||
}
|
||||
TestFrameworkManager *manager = TestFrameworkManager::instance();
|
||||
auto qtSettings = qSharedPointerCast<QtTestSettings>(manager->settingsForTestFramework(id));
|
||||
if (qtSettings.isNull())
|
||||
|
||||
Reference in New Issue
Block a user