no message

This commit is contained in:
2024-09-23 21:16:52 +03:00
parent a420ddbc9d
commit 39dbf5f146
3 changed files with 9 additions and 53 deletions

9
.idea/workspace.xml generated
View File

@@ -7,18 +7,9 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment=""> <list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/Common/Utils/Vector_.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Constants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/UI/Menus_2023/MainMenuBar/MainMenuBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/MainMenuBar/MainMenuBar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/UI/UI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/UI.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Utils/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/Utils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/Configuration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/Configuration/Configuration.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/SapforConfiguration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/SapforConfiguration.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/SapforConfiguration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfiguration/SapforConfiguration.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfigurationCommand/SapforConfigurationCommandsDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/SAPFOR/SapforConfigurationCommand/SapforConfigurationCommandsDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedSAPFORConfigurations.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedSAPFORConfigurations.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedSAPFORConfigurations.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSelectedSAPFORConfigurations.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/TestPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/TestPass.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/PassCode_2021.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -95,11 +95,10 @@ public class SapforConfiguration extends Configuration {
" запрещено применять более одного раза!"); " запрещено применять более одного раза!");
} else matches.add(code); } else matches.add(code);
} }
//2. Проверка входящих групп и тестов на корректность //2. Проверка входящих групп на единственный язык фортран
ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(this); ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(this);
//-- //--
Vector<Group> groups = cache.getGroups(); Vector<Group> groups = cache.getGroups();
Vector<Test> tests = cache.getTests();
Vector<LanguageName> groupsLanguages = new Vector<>(); Vector<LanguageName> groupsLanguages = new Vector<>();
//- //-
for (Group group : groups) { for (Group group : groups) {

View File

@@ -26,12 +26,9 @@ import java.util.LinkedHashMap;
import java.util.Vector; import java.util.Vector;
public class StartSelectedSAPFORConfigurations extends PublishServerObject<TestingServer, SapforPackage> { public class StartSelectedSAPFORConfigurations extends PublishServerObject<TestingServer, SapforPackage> {
Vector<SapforConfiguration> configurations; Vector<SapforConfiguration> configurations;
Vector<Group> groups;
Vector<Test> tests;
SapforTestingSet_json testingSet; //то, что добавляем. SapforTestingSet_json testingSet; //то, что добавляем.
//-- //--
protected LinkedHashMap<String, Test> testsByDescriptions = null; protected LinkedHashMap<String, Test> testsByDescriptions = null;
protected Vector<String> testsNames_lower = null; //все тесты что участвуют здесь
protected File sapfor = null; protected File sapfor = null;
//-- //--
protected Vector<SapforTask> new_tasks = null; protected Vector<SapforTask> new_tasks = null;
@@ -40,39 +37,12 @@ public class StartSelectedSAPFORConfigurations extends PublishServerObject<Testi
return "/icons/Start.png"; return "/icons/Start.png";
} }
//-- //--
protected boolean checkTestName(Test test) {
String name = test.description.toLowerCase();
if (testsNames_lower.contains(name)) {
Log.Writeln_("В пакет не могут входить тесты с одинаковыми именами (без учета регистра):" + test.description.toLowerCase());
return false;
}
testsNames_lower.add(name);
return true;
}
protected boolean checkTestsDescriptions(int groupId, Vector<Test> groupTests) {
if (groupTests.isEmpty()) {
Log.Writeln_("Пустая группа тестов: " + groupId);
return false;
}
for (Test test : groupTests) {
if (!checkTestName(test))
return false;
else
testsByDescriptions.put(test.description, test);
}
return true;
}
//--
public StartSelectedSAPFORConfigurations() { public StartSelectedSAPFORConfigurations() {
super(Global.testingServer, SapforPackage.class); super(Global.testingServer, SapforPackage.class);
} }
@Override @Override
protected boolean canStart(Object... args) throws Exception { protected boolean canStart(Object... args) throws Exception {
//-- //--
groups = new Vector<>();
tests = new Vector<>();
//--
testsNames_lower = new Vector<>();
testsByDescriptions = new LinkedHashMap<>(); testsByDescriptions = new LinkedHashMap<>();
//-- //--
new_tasks= new Vector<>(); new_tasks= new Vector<>();
@@ -101,19 +71,15 @@ public class StartSelectedSAPFORConfigurations extends PublishServerObject<Testi
//- //-
ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(configuration); ConfigurationCache cache = (ConfigurationCache) VisualCaches.GetCache(configuration);
//-- //--
groups = cache.getGroups(); Vector<Test>tests= cache.getTests();
tests = cache.getTests(); for (Test test:tests){
//-- String l_description = test.description.toLowerCase();
for (Group group : groups) { if (testsByDescriptions.containsKey(l_description)) {
Vector<Test> groupTests = new Vector<>(); Log.Writeln_("В пакет не могут входить тесты с одинаковыми именами (без учета регистра):" + test.description.toLowerCase());
for (Test test : tests) {
if (test.group_id == group.id)
groupTests.add(test);
}
//---
if (!checkTestsDescriptions(group.id,groupTests))
return false; return false;
//- }else {
testsByDescriptions.put(l_description, test);
}
} }
} }
target = new SapforPackage(Current.getAccount(), Current.getServerSapfor(), max_kernels); target = new SapforPackage(Current.getAccount(), Current.getServerSapfor(), max_kernels);