forked from qt-creator/qt-creator
Autotest: Keep track of generating framework in TestTreeItem
... and TestConfiguration. This allows dropping code that reconstruct framework ids and framework lookup by id. Change-Id: I0bb1e6e135376e21f96b9fab7971aa097787e483 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -29,13 +29,14 @@
|
||||
#include "../qtest/qttestsettings.h"
|
||||
#include "../qtest/qttest_utils.h"
|
||||
#include "../autotestplugin.h"
|
||||
#include "../testframeworkmanager.h"
|
||||
#include "../itestframework.h"
|
||||
#include "../testsettings.h"
|
||||
|
||||
namespace Autotest {
|
||||
namespace Internal {
|
||||
|
||||
QuickTestConfiguration::QuickTestConfiguration()
|
||||
QuickTestConfiguration::QuickTestConfiguration(ITestFramework *framework)
|
||||
: DebuggableTestConfiguration(framework)
|
||||
{
|
||||
setMixedDebugging(true);
|
||||
}
|
||||
@@ -43,10 +44,7 @@ QuickTestConfiguration::QuickTestConfiguration()
|
||||
TestOutputReader *QuickTestConfiguration::outputReader(const QFutureInterface<TestResultPtr> &fi,
|
||||
QProcess *app) const
|
||||
{
|
||||
static const Core::Id id
|
||||
= Core::Id(Constants::FRAMEWORK_PREFIX).withSuffix(QtTest::Constants::FRAMEWORK_NAME);
|
||||
TestFrameworkManager *manager = TestFrameworkManager::instance();
|
||||
auto qtSettings = dynamic_cast<QtTestSettings *>(manager->settingsForTestFramework(id));
|
||||
auto qtSettings = dynamic_cast<QtTestSettings *>(framework()->frameworkSettings());
|
||||
const QtTestOutputReader::OutputMode mode = qtSettings && qtSettings->useXMLOutput
|
||||
? QtTestOutputReader::XML
|
||||
: QtTestOutputReader::PlainText;
|
||||
@@ -56,9 +54,6 @@ TestOutputReader *QuickTestConfiguration::outputReader(const QFutureInterface<Te
|
||||
|
||||
QStringList QuickTestConfiguration::argumentsForTestRunner(QStringList *omitted) const
|
||||
{
|
||||
static const Core::Id id
|
||||
= Core::Id(Constants::FRAMEWORK_PREFIX).withSuffix(QtTest::Constants::FRAMEWORK_NAME);
|
||||
|
||||
QStringList arguments;
|
||||
if (AutotestPlugin::settings()->processArgs) {
|
||||
arguments.append(QTestUtils::filterInterfering
|
||||
@@ -66,8 +61,7 @@ QStringList QuickTestConfiguration::argumentsForTestRunner(QStringList *omitted)
|
||||
omitted, true));
|
||||
}
|
||||
|
||||
TestFrameworkManager *manager = TestFrameworkManager::instance();
|
||||
auto qtSettings = dynamic_cast<QtTestSettings *>(manager->settingsForTestFramework(id));
|
||||
auto qtSettings = dynamic_cast<QtTestSettings *>(framework()->frameworkSettings());
|
||||
if (!qtSettings)
|
||||
return arguments;
|
||||
if (qtSettings->useXMLOutput)
|
||||
|
||||
Reference in New Issue
Block a user