no message
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package _VisualDVM.TestingSystem.SAPFOR.Json;
|
||||
import Common.CommonConstants;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.SapforSettings;
|
||||
import _VisualDVM.Passes.PassCode;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforSettings.SapforSettings;
|
||||
import com.google.gson.annotations.Expose;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -26,19 +26,45 @@ public class SapforPackage_json implements Serializable {
|
||||
//--
|
||||
@Expose
|
||||
public int max_set_id = 0;
|
||||
public int getMaxSetId() {
|
||||
return max_set_id++;
|
||||
}
|
||||
@Expose
|
||||
public int max_task_id = 0;
|
||||
public int getMaxTaskId() {
|
||||
return max_task_id++;
|
||||
}
|
||||
//--в отличие от пакета двм,где достаточно инфы о задачах, тут есть инфа о тестах и конфигурациях
|
||||
@Expose
|
||||
public List<SapforTestingSet_json> testingSets = new Vector<>(); //по факту, сет один. Наследие формирования пакетов.
|
||||
@Expose
|
||||
public List<SapforTask> tasks = new Vector<>();
|
||||
//-
|
||||
public PackageSummary root = null;
|
||||
public PackageComparisonSummary comparison_root = null;
|
||||
//---
|
||||
public SapforPackage_json() {
|
||||
}
|
||||
public SapforPackage_json(ServerSapfor serverSapfor, LinkedHashMap<String, Test> testsByDescriptions, Vector<SapforConfiguration> configurations, int kernels_in) {
|
||||
sapfor_drv = serverSapfor.call_command;
|
||||
kernels = kernels_in;
|
||||
//рудимент от формирования пакетов. возможно, объединить с текущим классом.
|
||||
SapforTestingSet_json testingSet = new SapforTestingSet_json(testsByDescriptions, configurations);
|
||||
testingSet.id = getMaxSetId();
|
||||
testingSets.add(testingSet);
|
||||
//формирование задач
|
||||
LinkedHashMap<String, SapforTask> sortedTasks = new LinkedHashMap<>();
|
||||
for (SapforConfiguration_json sapforConfiguration_json : testingSet.configurations) {
|
||||
for (SapforTest_json test : testingSet.tests) {
|
||||
SapforTask task = new SapforTask(testingSet, test, sapforConfiguration_json);
|
||||
if (!sortedTasks.containsKey(task.getUniqueKey())) {
|
||||
task.id = getMaxTaskId();
|
||||
sortedTasks.put(task.getUniqueKey(), task);
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.addAll(sortedTasks.values());
|
||||
}
|
||||
public int getMaxSetId() {
|
||||
return max_set_id++;
|
||||
}
|
||||
public int getMaxTaskId() {
|
||||
return max_task_id++;
|
||||
}
|
||||
//--
|
||||
public Vector<String> getTasksKeys() {
|
||||
Vector<String> keys = new Vector<>();
|
||||
@@ -94,9 +120,6 @@ public class SapforPackage_json implements Serializable {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
//-
|
||||
public PackageSummary root = null;
|
||||
public PackageComparisonSummary comparison_root = null;
|
||||
//---------
|
||||
public void DropComparison() {
|
||||
comparison_root = null;
|
||||
@@ -178,27 +201,4 @@ public class SapforPackage_json implements Serializable {
|
||||
});
|
||||
return names;
|
||||
}
|
||||
//---
|
||||
public SapforPackage_json() {
|
||||
}
|
||||
public SapforPackage_json(ServerSapfor serverSapfor, LinkedHashMap<String, Test> testsByDescriptions, Vector<SapforConfiguration> configurations, int kernels_in) {
|
||||
sapfor_drv=serverSapfor.call_command;
|
||||
kernels = kernels_in;
|
||||
//рудимент от формирования пакетов. возможно, объединить с текущим классом.
|
||||
SapforTestingSet_json testingSet = new SapforTestingSet_json(testsByDescriptions, configurations);
|
||||
testingSet.id = getMaxSetId();
|
||||
testingSets.add(testingSet);
|
||||
//формирование задач
|
||||
LinkedHashMap<String, SapforTask> sortedTasks = new LinkedHashMap<>();
|
||||
for (SapforConfiguration_json sapforConfiguration_json : testingSet.configurations) {
|
||||
for (SapforTest_json test : testingSet.tests) {
|
||||
SapforTask task = new SapforTask(testingSet, test, sapforConfiguration_json);
|
||||
if (!sortedTasks.containsKey(task.getUniqueKey())) {
|
||||
task.id = getMaxTaskId();
|
||||
sortedTasks.put(task.getUniqueKey(), task);
|
||||
}
|
||||
}
|
||||
}
|
||||
tasks.addAll(sortedTasks.values());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,9 @@ public class SapforTest_json implements Serializable {
|
||||
public String description = "";
|
||||
@Expose
|
||||
public String group_description = "";
|
||||
public SapforTest_json(){}
|
||||
public SapforTest_json(Test test){
|
||||
public SapforTest_json() {
|
||||
}
|
||||
public SapforTest_json(Test test) {
|
||||
id = test.id;
|
||||
description = test.description;
|
||||
group_description = Global.testingServer.db.groups.get(test.group_id).description;
|
||||
|
||||
@@ -18,7 +18,8 @@ public class SapforTestingSet_json implements Serializable {
|
||||
public List<SapforTest_json> tests = new Vector<>();
|
||||
@Expose
|
||||
public List<SapforConfiguration_json> configurations = new Vector<>();
|
||||
public SapforTestingSet_json(){}
|
||||
public SapforTestingSet_json() {
|
||||
}
|
||||
public SapforTestingSet_json(LinkedHashMap<String, Test> testsByDescriptions, Vector<SapforConfiguration> sapforConfigurations) {
|
||||
for (Test test : testsByDescriptions.values())
|
||||
tests.add(new SapforTest_json(test));
|
||||
|
||||
@@ -2,7 +2,6 @@ package _VisualDVM.TestingSystem.SAPFOR.Json;
|
||||
import Common.CommonConstants;
|
||||
import Common.Utils.Utils_;
|
||||
import _VisualDVM.Constants;
|
||||
import _VisualDVM.Utils;
|
||||
import _VisualDVM.ProjectData.Files.DBProjectFile;
|
||||
import _VisualDVM.ProjectData.Files.FileType;
|
||||
import _VisualDVM.ProjectData.Files.ProjectFile;
|
||||
@@ -11,6 +10,7 @@ import _VisualDVM.ProjectData.Messages.Errors.MessageError;
|
||||
import _VisualDVM.ProjectData.Project.db_project_info;
|
||||
import _VisualDVM.Repository.Component.Sapfor.Sapfor;
|
||||
import _VisualDVM.TestingSystem.SAPFOR.SapforTask.SapforTask;
|
||||
import _VisualDVM.Utils;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user