forked from qt-creator/qt-creator
CppEditor: Fix running tests with clangd
Try harder to find a suitable kit: - Pick one without warnings. - Pick one with a Qt, as otherwise configureAsExampleProject() will fail. Change-Id: I5a38e86bd81840c6794de365980618c904936d3a Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -494,8 +494,10 @@ void FollowSymbolTest::initTestCase()
|
||||
return;
|
||||
|
||||
// Find suitable kit.
|
||||
// Qt is not actually required for the tests, but we need it for consistency with
|
||||
// configureAsExampleProject().
|
||||
F2TestCase::m_testKit = Utils::findOr(KitManager::kits(), nullptr, [](const Kit *k) {
|
||||
return k->isValid();
|
||||
return k->isValid() && !k->hasWarning() && k->value("QtSupport.QtInformation").isValid();
|
||||
});
|
||||
if (!F2TestCase::m_testKit)
|
||||
QSKIP("This test requires at least one kit to be present");
|
||||
|
Reference in New Issue
Block a user