исправление опечатки в сообщении.
учет в конфигурациях распареллеливания на общую память, и двмh регионов. как и варианты. запрещено ставить больше одного. и не последними.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
package Visual_DVM_2021.Passes.All;
|
||||
import Common.Constants;
|
||||
import Common.Current;
|
||||
import Common.Global;
|
||||
import Common.UI.UI;
|
||||
import Common.Utils.Index;
|
||||
import ProjectData.LanguageName;
|
||||
import Repository.Server.ServerCode;
|
||||
import Repository.Server.ServerExchangeUnit_2021;
|
||||
@@ -83,15 +85,41 @@ public class StartSapforTests extends TestingSystemPass<SapforTasksPackage> {
|
||||
//--
|
||||
return true;
|
||||
}
|
||||
boolean checkTerminalCode(SapforConfiguration sapforConfiguration, PassCode_2021 code, int count, Vector<PassCode_2021> codes) {
|
||||
if (count > 2) {
|
||||
Log.Writeln_("Неверная конфигурация:" + sapforConfiguration.id + ": " +
|
||||
code.getDescription() +
|
||||
" возможно только один раз.");
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
if ((count == 1) && codes.size() > 1) {
|
||||
if (!codes.lastElement().equals(code)) {
|
||||
Log.Writeln_("Неверная конфигурация:" + sapforConfiguration.id + ": " +
|
||||
code.getDescription() +
|
||||
" может быть только завершающей командой!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public boolean getConfigurationCommands(SapforConfiguration sapforConfiguration) {
|
||||
//1. получить список всех команд.
|
||||
Vector<PassCode_2021> codes = new Vector<>();
|
||||
int v = 0;
|
||||
//-- счетчик завершающих команд.
|
||||
LinkedHashMap<PassCode_2021, Index> terminalCodesCount = new LinkedHashMap<>();
|
||||
for (PassCode_2021 code : Constants.terminalSapforTestingCodes)
|
||||
terminalCodesCount.put(code, new Index());
|
||||
//--
|
||||
for (SapforConfigurationCommand command : Global.testingServer.db.sapforConfigurationCommands.Data.values()) {
|
||||
if (command.sapforconfiguration_id.equals(sapforConfiguration.id)) {
|
||||
codes.add(command.passCode);
|
||||
if (command.passCode.equals(PassCode_2021.CreateParallelVariants))
|
||||
v++;
|
||||
//---
|
||||
for (PassCode_2021 t_code : Constants.terminalSapforTestingCodes) {
|
||||
if (command.passCode.equals(t_code))
|
||||
terminalCodesCount.get(t_code).Inc();
|
||||
}
|
||||
//---
|
||||
}
|
||||
}
|
||||
//--
|
||||
@@ -99,18 +127,13 @@ public class StartSapforTests extends TestingSystemPass<SapforTasksPackage> {
|
||||
Log.Writeln_("Пустая конфигурация:" + sapforConfiguration.id);
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
if (v > 2) {
|
||||
Log.Writeln_("Неверная конфигурация:" + sapforConfiguration.id + ": построение параллельных вариантов возможно единожды.");
|
||||
return false;
|
||||
}
|
||||
//--
|
||||
if ((v == 1) && codes.size() > 1) {
|
||||
if (!codes.lastElement().equals(PassCode_2021.CreateParallelVariants)) {
|
||||
Log.Writeln_("Неверная конфигурация:" + sapforConfiguration.id + ": построение параллельных вариантов может быть только завершающей командой!");
|
||||
for (PassCode_2021 t_code : Constants.terminalSapforTestingCodes) {
|
||||
if (!checkTerminalCode(sapforConfiguration, t_code,
|
||||
terminalCodesCount.get(t_code).getValue(), codes
|
||||
))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//--
|
||||
return true;
|
||||
}
|
||||
//--
|
||||
@@ -218,6 +241,6 @@ public class StartSapforTests extends TestingSystemPass<SapforTasksPackage> {
|
||||
@Override
|
||||
protected void showDone() throws Exception {
|
||||
server.account_db.sapforTasksPackages.ui_.Select(target.id);
|
||||
// UI.getMainWindow().getTestingWindow().ShowAutoActualizeTestsState();
|
||||
// UI.getMainWindow().getTestingWindow().ShowAutoActualizeTestsState();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user