forked from qt-creator/qt-creator
AutoTest: Use new test object setup
Change-Id: Icf750f084d8c2b5c34e62dfedd62bc785406d590 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -283,6 +283,8 @@ void AutotestPlugin::initialize()
|
|||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
ExtensionSystem::PluginManager::registerScenario("TestModelManagerInterface",
|
ExtensionSystem::PluginManager::registerScenario("TestModelManagerInterface",
|
||||||
[] { return dd->m_loadProjectScenario(); });
|
[] { return dd->m_loadProjectScenario(); });
|
||||||
|
|
||||||
|
addTest<AutoTestUnitTests>(&dd->m_testTreeModel);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -540,15 +542,6 @@ void AutotestPlugin::popupResultsPane()
|
|||||||
dd->m_resultsPane->popup(Core::IOutputPane::NoModeSwitch);
|
dd->m_resultsPane->popup(Core::IOutputPane::NoModeSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<QObject *> AutotestPlugin::createTestObjects() const
|
|
||||||
{
|
|
||||||
QVector<QObject *> tests;
|
|
||||||
#ifdef WITH_TESTS
|
|
||||||
tests << new AutoTestUnitTests(&dd->m_testTreeModel);
|
|
||||||
#endif
|
|
||||||
return tests;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ChoicePair::matches(const ProjectExplorer::RunConfiguration *rc) const
|
bool ChoicePair::matches(const ProjectExplorer::RunConfiguration *rc) const
|
||||||
{
|
{
|
||||||
return rc && rc->displayName() == displayName && rc->runnable().command.executable() == executable;
|
return rc && rc->displayName() == displayName && rc->runnable().command.executable() == executable;
|
||||||
|
|||||||
@@ -51,9 +51,6 @@ public:
|
|||||||
static ChoicePair cachedChoiceFor(const QString &buildTargetKey);
|
static ChoicePair cachedChoiceFor(const QString &buildTargetKey);
|
||||||
static void clearChoiceCache();
|
static void clearChoiceCache();
|
||||||
static void popupResultsPane();
|
static void popupResultsPane();
|
||||||
|
|
||||||
private:
|
|
||||||
QVector<QObject *> createTestObjects() const override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
Reference in New Issue
Block a user