no message

This commit is contained in:
2023-10-29 01:03:37 +03:00
parent 9be7fa227f
commit a4fbb739a9
10 changed files with 39 additions and 21 deletions

View File

@@ -3,9 +3,7 @@ import Common.Constants;
import Common.Global;
import Common.Utils.Utils;
import GlobalData.Tasks.TaskState;
import ProjectData.LanguageName;
import ProjectData.Messages.Errors.MessageError;
import ProjectData.Project.db_project_info;
import SapforTestingSystem.Json.SapforConfiguration_json;
import SapforTestingSystem.Json.SapforVersion_json;
import SapforTestingSystem.SapforTask.SapforTask;
@@ -34,6 +32,7 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
File sapfor_drv;
SapforConfiguration_json sapforConfiguration_json;
//-----
File root;
File parentTask;
File task;
//-----
@@ -53,6 +52,7 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
target = (SapforTask) args[2];
//--->>
parentTask = Paths.get(Global.Home, sapforConfiguration_json.id, target.test_description).toFile();
root = new File(Global.Home, sapforConfiguration_json.id);
task = null;
//--->>
return true;
@@ -138,7 +138,9 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
task = new File(parentTask, "v1");
Utils.CheckAndCleanDirectory(task); //папка для преобразования.
//если версия пустая, это тоже результат тестирования. Поэтому должна учитываться в древе.
target.versions.add(new SapforVersion_json(task.getAbsolutePath(), code.getDescription()));
target.versions.add(new SapforVersion_json(
root.getAbsolutePath(),
task.getAbsolutePath(), code.getDescription()));
//---
if (performSapforScript("transformation", parentTask,
code.getTestingCommand() + " -F " + Utils.DQuotes(task.getAbsolutePath()),
@@ -166,7 +168,11 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
Vector<File> files = new Vector<>(Arrays.asList(files_));
files.sort(Comparator.comparingInt(o -> Integer.parseInt(o.getName().substring(1))));
for (File file : files)
target.variants.add(new SapforVersion_json(file.getAbsolutePath(), PassCode_2021.SPF_CreateParallelVariant.getDescription()));
target.variants.add(
new SapforVersion_json(
root.getAbsolutePath(),
file.getAbsolutePath(), PassCode_2021.SPF_CreateParallelVariant.getDescription()));
}
}
//-------------------------------------------------->>
@@ -287,6 +293,7 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
}
}
//--
/*
protected void createVersionProjectData(SapforVersion_json version, boolean isTransformation) throws Exception {
db_project_info project = new db_project_info();
project.Home = new File(version.version);
@@ -320,7 +327,7 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
}
project.CreateVisualiserData();
//---
/*
if (isTransformation && !messages.isEmpty()) {
project.Open(); //нельзя!!! сначала надо определиться с версиями. И только потом, получать файлы.
//а так же, убрать dep и txt
@@ -336,15 +343,12 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
project.db.Commit();
project.db.Disconnect();
}
*/
}
*/
//-------------------------------------------------->>
@Override
protected void body() throws Exception {
target.versions.add(new SapforVersion_json(
Paths.get(Global.Home,
sapforConfiguration_json.id,
target.test_description).toFile().getAbsolutePath(), "исходная"));
target.versions.add(new SapforVersion_json(target.test_description, "исходная"));
for (PassCode_2021 code : sapforConfiguration_json.codes) {
if (parse()) {
if (code.equals(PassCode_2021.CreateParallelVariants))