forked from qt-creator/qt-creator
TestRunner: Reuse TaskTree
Get rid of QFutureInterface argument from ITestConfiguration::createOutputReader() and from TestOutputReader c'tor. The fine-grained progress reporting was broken anyway: 1. The assumption was that testCaseCount was meant to be the total number of test functions executed. It didn't include the initTestCase() and cleanupTestCase(), while those were reported on runtime apparently (and exceeding the max progress by 2). 2. In case of tst_qtcprocess, when the whole test was run, the testCaseCount reported 41, while the real number of functions was 26 (+2 = 28 for init/cleanup). 3. While the max progress was set to testCaseCount initially, the corresponding FutureProgress rendered the progress always in 0-100 range, what didn't match the reality. Instead, rely on TaskTree progress, which resolution is per test as a whole. So, when executing a series of tests this should scale fine. In addition, the progress advances fluently according to the expected run time - with 10 seconds hardcoded. The original code locations, where progress was bumped, are left with a TODO comment for any possible future tweaks. Like in case of result reporting, fine-grained progress reporting may be implemented by providing additional signal, so there is no need for QFutureInterface inside TestOutputReader. Change-Id: Idc11d55e3a49dac8d1788948b9a82f68199203c6 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -4,22 +4,19 @@
|
||||
#include "testconfiguration.h"
|
||||
|
||||
#include "itestframework.h"
|
||||
#include "testoutputreader.h"
|
||||
#include "testrunconfiguration.h"
|
||||
|
||||
#include <cppeditor/cppmodelmanager.h>
|
||||
#include <cppeditor/projectinfo.h>
|
||||
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
#include <projectexplorer/buildsystem.h>
|
||||
#include <projectexplorer/buildtargetinfo.h>
|
||||
#include <projectexplorer/deploymentdata.h>
|
||||
#include <projectexplorer/environmentaspect.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
#include <projectexplorer/session.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
|
||||
#include <QLoggingCategory>
|
||||
|
||||
static Q_LOGGING_CATEGORY(LOG, "qtc.autotest.testconfiguration", QtWarningMsg)
|
||||
@@ -29,7 +26,6 @@ using namespace Utils;
|
||||
|
||||
namespace Autotest {
|
||||
|
||||
|
||||
ITestConfiguration::ITestConfiguration(ITestBase *testBase)
|
||||
: m_testBase(testBase)
|
||||
{
|
||||
@@ -94,7 +90,7 @@ static FilePath ensureExeEnding(const FilePath &file)
|
||||
return file.withExecutableSuffix();
|
||||
}
|
||||
|
||||
void TestConfiguration::completeTestInformation(ProjectExplorer::RunConfiguration *rc,
|
||||
void TestConfiguration::completeTestInformation(RunConfiguration *rc,
|
||||
TestRunMode runMode)
|
||||
{
|
||||
QTC_ASSERT(rc, return);
|
||||
|
||||
Reference in New Issue
Block a user