forked from qt-creator/qt-creator
AutoTest: Add option to disable derived checks
Previously the quick test parser would always check each symbol its interested in to see if it might be derived from "TestCase". This is very expensive. This patch adds an option allowing the user to enable or disable the check. By default the check is disabled. Change-Id: Ia6b230b344add672e53ad7fb52845c78a2914b99 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -4,8 +4,11 @@
|
||||
#include "autotestunittests.h"
|
||||
|
||||
#include "testcodeparser.h"
|
||||
#include "testframeworkmanager.h"
|
||||
#include "testtreemodel.h"
|
||||
|
||||
#include "qtest/qttestsettings.h"
|
||||
|
||||
#include <cppeditor/cppmodelmanager.h>
|
||||
#include <cppeditor/cpptoolstestcase.h>
|
||||
#include <cppeditor/projectinfo.h>
|
||||
@@ -72,6 +75,12 @@ void AutoTestUnitTests::initTestCase()
|
||||
m_checkBoost = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Enable quick check for derived tests
|
||||
static const Utils::Id id = Utils::Id("AutoTest.Framework.QtTest");
|
||||
static_cast<Autotest::Internal::QtTestSettings *>(
|
||||
TestFrameworkManager::frameworkForId(id)->testSettings())
|
||||
->quickCheckForDerivedTests.setValue(true);
|
||||
}
|
||||
|
||||
void AutoTestUnitTests::cleanupTestCase()
|
||||
|
||||
Reference in New Issue
Block a user