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

11
.idea/workspace.xml generated
View File

@@ -8,10 +8,15 @@
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/UI/Menus_2023/SapforTasksPackagesBar/SapforTasksPackagesBar.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Menus_2023/SapforTasksPackagesBar/SapforTasksPackagesBar.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/Json/SapforVersion_json.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/Json/SapforVersion_json.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/PackageModeSupervisor/PackageModeSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/PackageModeSupervisor/PackageModeSupervisor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/PerformSapforTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTask/SapforTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTask/SapforTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageInterface.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackageInterface.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackageFields.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/SapforPackageFields.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackageSupervisor/SapforTasksPackageSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackageSupervisor/SapforTasksPackageSupervisor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/TestingServer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DeleteSapforTasksPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DeleteSapforTasksPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadSapforTasksPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadSapforTasksPackage.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -11,4 +11,8 @@ public class SapforVersion_json implements Serializable {
version = version_in;
description = description_in;
}
public SapforVersion_json(String root_in, String version_in, String description_in) {
version = version_in.substring(root_in.length() + 1);
description = description_in;
}
}

View File

@@ -36,6 +36,7 @@ public class PackageModeSupervisor extends ThreadsPlanner {
task.test_description = test.test_description;
task.flags = sapforConfiguration_json.flags;
task.sapfor_configuration_id = sapforConfiguration_json.id;
task.sapfortaskspackage_id = new File(Global.Home).getName();
results_json.tasks.add(task);
Vector<String> codes_s = new Vector<>();
for (PassCode_2021 code: sapforConfiguration_json.codes){

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))

View File

@@ -8,11 +8,7 @@ import SapforTestingSystem.Json.SapforVersion_json;
import Visual_DVM_2021.Passes.PassCode_2021;
import com.google.gson.annotations.Expose;
import com.sun.org.glassfish.gmbal.Description;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.nio.charset.Charset;
import java.util.List;
import java.util.Vector;
public class SapforTask extends DBObject {
//------------------------------------>>
@@ -22,6 +18,7 @@ public class SapforTask extends DBObject {
@Description("DEFAULT '-1'")
@Expose
public String sapfor_configuration_id = "";
@Expose
@Description("DEFAULT ''")
public String sapfortaskspackage_id = "";
//------------------------------------->>
@@ -91,6 +88,8 @@ public class SapforTask extends DBObject {
}
return String.join("", versionsLines);
}
/*
public static boolean compareVersionsFiles(SapforVersion_json version1, SapforVersion_json version2, List<String> files) throws Exception {
for (String fileName : files) {
File file1 = new File(version1.version, fileName);
@@ -134,9 +133,10 @@ public class SapforTask extends DBObject {
//--
if (!compareVersionsFiles(version1, version2, filesList)) return false;
}
*/
return false;
}
*/
@Override
public boolean isVisible() {
return Current.HasSapforTasksPackage()&&Current.getSapforTasksPackage().id.equals(this.sapfortaskspackage_id);

View File

@@ -56,7 +56,7 @@ public class SapforTasksPackageInterface {
DefaultMutableTreeNode taskNode = new DefaultMutableTreeNode(task.test_description);
for (SapforVersion_json version: task.versions){
DefaultMutableTreeNode versionNode = new DefaultMutableTreeNode(version.description);
File
//
Vector<DBProjectFile> files = getProjectFiles(version.version);
taskNode.add(versionNode);
}

View File

@@ -196,7 +196,6 @@ public class SapforTasksPackageSupervisor {
count += tasks.size();
for (SapforTask task : tasks) {
task.versionsDescription = task.getVersionsChain();
task.sapfortaskspackage_id = sapforTasksPackage.id;
flagsLines.add(
"тест: " +
Utils.Brackets(task.test_description) + " " +

View File

@@ -327,6 +327,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
results_file, SapforTasksResults_json.class);
}
//надо в другое место.
/*
public Vector<String> CompareSapforPackages(SapforTasksPackage package1, SapforTasksPackage package2) throws Exception {
Vector<String> comparisonLog = new Vector<>();
// чтобы сравнивать. должен быть идентичный список тестов. (без учета последовательности)
@@ -364,6 +365,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
}
return comparisonLog;
}
*/
@Override
protected void Session() throws Exception {
DBObject dbObject = null;

View File

@@ -1,8 +1,10 @@
package Visual_DVM_2021.Passes.All;
import Common.Current;
import Common.Utils.Utils;
import Repository.Server.ServerCode;
import Repository.Server.ServerExchangeUnit_2021;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackageInterface;
import TestingSystem.TasksPackage.TasksPackageState;
import Visual_DVM_2021.Passes.PassCode_2021;
import Visual_DVM_2021.Passes.TestingSystemPass;
@@ -37,6 +39,7 @@ public class DeleteSapforTasksPackage extends TestingSystemPass<SapforTasksPacka
@Override
protected void performDone() throws Exception {
super.performDone();
Utils.delete_with_check(SapforTasksPackageInterface.getLocalWorkspace(target));
passes.get(PassCode_2021.SynchronizeTestsTasks).Do();
}
}

View File

@@ -55,7 +55,7 @@ public class DownloadSapforTasksPackage extends TestingSystemPass<SapforTasksPac
@Override
protected void performDone() throws Exception {
super.performDone();
File packageWorkspace = new File(Global.SapforPackagesDirectory, target.id);
File packageWorkspace = SapforTasksPackageInterface.getLocalWorkspace(target);
Utils.forceDeleteWithCheck(packageWorkspace);
if (passes.get(PassCode_2021.UnzipFolderPass).Do(
tmpArchive.getAbsolutePath(),