forked from qt-creator/qt-creator
AutoTest: Use more concise aspect access
Change-Id: Iad5b82f697d4c32ff444b230dbb682833dbc5f82 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -114,16 +114,16 @@ CTestTool::CTestTool()
|
|||||||
QStringList CTestTool::activeSettingsAsOptions() const
|
QStringList CTestTool::activeSettingsAsOptions() const
|
||||||
{
|
{
|
||||||
QStringList options;
|
QStringList options;
|
||||||
if (outputOnFail.value())
|
if (outputOnFail())
|
||||||
options << "--output-on-failure";
|
options << "--output-on-failure";
|
||||||
switch (outputMode.value()) {
|
switch (outputMode()) {
|
||||||
case 1: options << "-V"; break;
|
case 1: options << "-V"; break;
|
||||||
case 2: options << "-VV"; break;
|
case 2: options << "-VV"; break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
if (repeat.value()) {
|
if (repeat()) {
|
||||||
QString repeatOption;
|
QString repeatOption;
|
||||||
switch (repetitionMode.value()) {
|
switch (repetitionMode()) {
|
||||||
case 0: repeatOption = "until-fail"; break;
|
case 0: repeatOption = "until-fail"; break;
|
||||||
case 1: repeatOption = "until-pass"; break;
|
case 1: repeatOption = "until-pass"; break;
|
||||||
case 2: repeatOption = "after-timeout"; break;
|
case 2: repeatOption = "after-timeout"; break;
|
||||||
@@ -131,18 +131,18 @@ QStringList CTestTool::activeSettingsAsOptions() const
|
|||||||
}
|
}
|
||||||
if (!repeatOption.isEmpty()) {
|
if (!repeatOption.isEmpty()) {
|
||||||
repeatOption.append(':');
|
repeatOption.append(':');
|
||||||
repeatOption.append(QString::number(repetitionCount.value()));
|
repeatOption.append(QString::number(repetitionCount()));
|
||||||
options << "--repeat" << repeatOption;
|
options << "--repeat" << repeatOption;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (scheduleRandom.value())
|
if (scheduleRandom())
|
||||||
options << "--schedule-random";
|
options << "--schedule-random";
|
||||||
if (stopOnFailure.value())
|
if (stopOnFailure())
|
||||||
options << "--stop-on-failure";
|
options << "--stop-on-failure";
|
||||||
if (parallel.value()) {
|
if (parallel()) {
|
||||||
options << "-j" << QString::number(jobs.value());
|
options << "-j" << QString::number(jobs());
|
||||||
if (testLoad.value())
|
if (testLoad())
|
||||||
options << "--test-load" << QString::number(threshold.value());
|
options << "--test-load" << QString::number(threshold());
|
||||||
}
|
}
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
@@ -155,7 +155,7 @@ void TestSettings::fromSettings()
|
|||||||
|
|
||||||
RunAfterBuildMode TestSettings::runAfterBuildMode() const
|
RunAfterBuildMode TestSettings::runAfterBuildMode() const
|
||||||
{
|
{
|
||||||
return static_cast<RunAfterBuildMode>(runAfterBuild.value());
|
return static_cast<RunAfterBuildMode>(runAfterBuild());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Autotest::Internal
|
} // namespace Autotest::Internal
|
||||||
|
Reference in New Issue
Block a user