no message

This commit is contained in:
2023-10-10 16:53:29 +03:00
parent 94e77b4607
commit c05eb12737
11 changed files with 55 additions and 40 deletions

12
.idea/workspace.xml generated
View File

@@ -8,8 +8,16 @@
<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 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/Utils/InterruptThread.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/InterruptThread.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/Repository/RepositoryServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/RepositoryServer.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/InstallServerSapfor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/InstallServerSapfor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSapforTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/StartSapforTests.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SynchronizeTestsTasks.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/SynchronizeTestsTasks.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" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SSH/ConnectionPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/SSH/ConnectionPass.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/TestingForm.form" 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" />
</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

@@ -150,7 +150,6 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
target.state = performSapforScript("create_variants", parentTask, " -t 13 -allVars" target.state = performSapforScript("create_variants", parentTask, " -t 13 -allVars"
+ " -tinfo" + " -tinfo"
, ,
Constants.out_file, Constants.out_file,
Constants.err_file Constants.err_file
) ? TaskState.Done : TaskState.DoneWithErrors; ) ? TaskState.Done : TaskState.DoneWithErrors;
@@ -293,7 +292,7 @@ public class PerformSapforTask extends Pass_2021<SapforTask> {
//-- //--
if (isTransformation) { if (isTransformation) {
File p_out = Paths.get(project.Home.getAbsolutePath(), Constants.data, Constants.parse_out_file).toFile(); File p_out = Paths.get(project.Home.getAbsolutePath(), Constants.data, Constants.parse_out_file).toFile();
File p_err = Paths.get(project.Home.getAbsolutePath(), Constants.data,Constants.parse_err_file).toFile(); File p_err = Paths.get(project.Home.getAbsolutePath(), Constants.data, Constants.parse_err_file).toFile();
File out = Paths.get(project.Home.getAbsolutePath(), Constants.data, Constants.out_file).toFile(); File out = Paths.get(project.Home.getAbsolutePath(), Constants.data, Constants.out_file).toFile();
File err = Paths.get(project.Home.getAbsolutePath(), Constants.data, Constants.err_file).toFile(); File err = Paths.get(project.Home.getAbsolutePath(), Constants.data, Constants.err_file).toFile();
//-- //--

View File

@@ -57,7 +57,7 @@ public class SapforTasksPackageSupervisor extends ThreadsPlanner {
//записать результаты всех задач. //записать результаты всех задач.
try { try {
Utils.jsonToFile(results_json, new File(Global.Home, "results")); Utils.jsonToFile(results_json, new File(Global.Home, "results_json"));
//тут же и строить версии. //тут же и строить версии.
Utils.deleteFilesByExtensions(new File(Global.Home),"proj","dep"); //Потом txt тоже добавить. Utils.deleteFilesByExtensions(new File(Global.Home),"proj","dep"); //Потом txt тоже добавить.
FileUtils.writeStringToFile(new File(Constants.DONE), ""); FileUtils.writeStringToFile(new File(Constants.DONE), "");

View File

@@ -22,7 +22,6 @@ import SapforTestingSystem.SapforConfiguration.SapforConfigurationInterface;
import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage; import SapforTestingSystem.SapforTasksPackage.SapforTasksPackage;
import SapforTestingSystem.SapforTasksPackage_info; import SapforTestingSystem.SapforTasksPackage_info;
import SapforTestingSystem.ServerSapfor.ServerSapfor; import SapforTestingSystem.ServerSapfor.ServerSapfor;
import SapforTestingSystem.ServerSapforTestingPlanner.ServerSapforTestingPlanner;
import TestingSystem.Group.Group; import TestingSystem.Group.Group;
import TestingSystem.Group.GroupInterface; import TestingSystem.Group.GroupInterface;
import TestingSystem.Tasks.TestCompilationTask; import TestingSystem.Tasks.TestCompilationTask;
@@ -223,8 +222,10 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
} }
protected TestingPlanner testingPlanner = new TestingPlanner(); protected TestingPlanner testingPlanner = new TestingPlanner();
protected Thread testingThread = new Thread(() -> testingPlanner.Perform()); protected Thread testingThread = new Thread(() -> testingPlanner.Perform());
/*
protected ServerSapforTestingPlanner sapforTestingPlanner = new ServerSapforTestingPlanner(); protected ServerSapforTestingPlanner sapforTestingPlanner = new ServerSapforTestingPlanner();
protected Thread sapforTestingThread = new Thread(() -> sapforTestingPlanner.Perform()); protected Thread sapforTestingThread = new Thread(() -> sapforTestingPlanner.Perform());
*/
//------>>> //------>>>
public static boolean checkTasks = false; public static boolean checkTasks = false;
//-- //--

View File

@@ -42,10 +42,15 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
return false; return false;
} }
@Override @Override
protected boolean needsAnimation() {
return true;
}
@Override
protected void ServerAction() throws Exception { protected void ServerAction() throws Exception {
RemoteFile testingSystemHome = new RemoteFile(sftpChannel.pwd(), "testing_system", true); RemoteFile testingSystemHome = new RemoteFile(sftpChannel.pwd(), "testing_system", true);
RemoteFile repo = new RemoteFile(testingSystemHome.full_name, "Repo", true); RemoteFile repo = new RemoteFile(testingSystemHome.full_name, "Repo", true);
RemoteFile repoSapforHome = new RemoteFile(repo.full_name + "/sapfor/experts/Sapfor_2017/_bin", true); RemoteFile repoSapforHome = new RemoteFile(repo.full_name + "/sapfor/experts/Sapfor_2017/_bin", true);
ShowMessage2("Вывод в консоли визуализатора");
//-->> //-->>
ShowMessage1("Синхронизация ветви DVM..."); ShowMessage1("Синхронизация ветви DVM...");
ShellCommand("cd " + Utils.DQuotes(repo.full_name), "svn checkout " + Constants.REPOSITORY_AUTHENTICATION + " " + Constants.DVM_REPOSITORY + "\n"); ShellCommand("cd " + Utils.DQuotes(repo.full_name), "svn checkout " + Constants.REPOSITORY_AUTHENTICATION + " " + Constants.DVM_REPOSITORY + "\n");

View File

@@ -5,9 +5,9 @@ import Common.UI.UI;
import ProjectData.LanguageName; import ProjectData.LanguageName;
import Repository.Server.ServerCode; import Repository.Server.ServerCode;
import Repository.Server.ServerExchangeUnit_2021; import Repository.Server.ServerExchangeUnit_2021;
import SapforTestingSystem.SapforTasksPackage_info;
import SapforTestingSystem.SapforConfiguration.SapforConfiguration; import SapforTestingSystem.SapforConfiguration.SapforConfiguration;
import SapforTestingSystem.SapforConfigurationCommand.SapforConfigurationCommand; import SapforTestingSystem.SapforConfigurationCommand.SapforConfigurationCommand;
import SapforTestingSystem.SapforTasksPackage_info;
import TestingSystem.Group.Group; import TestingSystem.Group.Group;
import TestingSystem.Test.Test; import TestingSystem.Test.Test;
import Visual_DVM_2021.Passes.PassCode_2021; import Visual_DVM_2021.Passes.PassCode_2021;
@@ -181,14 +181,21 @@ public class StartSapforTests extends TestingSystemPass<SapforTasksPackage_info>
for (Test test : allTests.values()) for (Test test : allTests.values())
target.testsIds.add(test.id); target.testsIds.add(test.id);
//-- //--
ShowMessage1("Создание рабочих пространств...");
for (SapforConfiguration configuration : Global.testingServer.db.sapforConfigurations.getCheckedItems()) for (SapforConfiguration configuration : Global.testingServer.db.sapforConfigurations.getCheckedItems())
target.configurationsIds.add(configuration.id); target.configurationsIds.add(configuration.id);
Command(new ServerExchangeUnit_2021(ServerCode.StartSapforTests, "", target)); Command(new ServerExchangeUnit_2021(ServerCode.StartSapforTests, "", target));
} }
@Override @Override
protected void performFinish() throws Exception { protected void performDone() throws Exception {
super.performFinish(); passes.get(PassCode_2021.SynchronizeTestsTasks).Do();
//passes.get(PassCode_2021.SynchronizeTests).Do(); /*
if (!TestingServer.checkTasks)
TestingServer.TimerOn();
Global.db.BeginTransaction();
for (TestRunTask testRunTask : server.account_db.testRunTasks.Data.values())
if (testRunTask.taskspackage_id.equals(target.id))
Global.db.Insert(new TaskKey_2022(testRunTask.id, target.id));
Global.db.Commit();
*/
} }
} }

View File

@@ -35,7 +35,7 @@ public class SynchronizeTestsTasks extends TestingSystemPass<Vector<Integer>> {
@Override @Override
protected void showPreparation() throws Exception { protected void showPreparation() throws Exception {
server.account_db.packages.ClearUI(); server.account_db.packages.ClearUI();
// server.account_db.sapforTasksPackages.ClearUI(); server.account_db.sapforTasksPackages.ClearUI();
} }
@Override @Override
protected void ServerAction() throws Exception { protected void ServerAction() throws Exception {
@@ -63,7 +63,7 @@ public class SynchronizeTestsTasks extends TestingSystemPass<Vector<Integer>> {
@Override @Override
protected void showDone() throws Exception { protected void showDone() throws Exception {
server.account_db.packages.ShowUI(); server.account_db.packages.ShowUI();
// server.account_db.sapforTasksPackages.ShowUI(); server.account_db.sapforTasksPackages.ShowUI();
if (!TestingServer.checkTasks) UI.getMainWindow().getTestingWindow().ShowAutoActualizeTestsState(); if (!TestingServer.checkTasks) UI.getMainWindow().getTestingWindow().ShowAutoActualizeTestsState();
} }
} }

View File

@@ -414,10 +414,6 @@ public enum PassCode_2021 {
return "Проверка удалённой рабочей папки"; return "Проверка удалённой рабочей папки";
case PublishRemoteWorkspace: case PublishRemoteWorkspace:
return "Публикация удалённой рабочей папки"; return "Публикация удалённой рабочей папки";
/*
case GetRemoteUserHome:
return "Получить корневую папку серверного компонента";
*/
case ApplyCurrentFunction: case ApplyCurrentFunction:
return "Назначить текущую функцию по имени"; return "Назначить текущую функцию по имени";
case AbortSelectedPackages: case AbortSelectedPackages:

View File

@@ -17,7 +17,6 @@ import java.net.UnknownHostException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Vector; import java.util.Vector;
//убираем лишний класс-прослойку. //убираем лишний класс-прослойку.
//старый server pass Пока не трогаем. //старый server pass Пока не трогаем.
//https://stackoverflow.com/questions/15108923/sftp-file-transfer-using-java-jsch //https://stackoverflow.com/questions/15108923/sftp-file-transfer-using-java-jsch
@@ -167,7 +166,6 @@ public abstract class ConnectionPass<T> extends Pass_2021<T> {
br.close(); br.close();
return res; return res;
} }
public void getSingleFile(String src, String dst) throws Exception { public void getSingleFile(String src, String dst) throws Exception {
sftpChannel.get(src, dst); sftpChannel.get(src, dst);
} }

View File

@@ -836,7 +836,7 @@
</properties> </properties>
<border type="none"/> <border type="none"/>
<children> <children>
<grid id="a5ba7" binding="sapforPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0"> <grid id="a5ba7" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints> <constraints>
<splitpane position="right"/> <splitpane position="right"/>
</constraints> </constraints>
@@ -846,7 +846,7 @@
<border type="none"/> <border type="none"/>
<children/> <children/>
</grid> </grid>
<grid id="eec01" binding="sapforScenariosPanel" layout-manager="BorderLayout" hgap="0" vgap="0"> <grid id="eec01" binding="sapforTasksPackagesPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints> <constraints>
<splitpane position="left"/> <splitpane position="left"/>
</constraints> </constraints>

View File

@@ -83,12 +83,12 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
private JLabel sapforConfigurationsLabel; private JLabel sapforConfigurationsLabel;
private JLabel sapforConfigurationsCommandsLabel; private JLabel sapforConfigurationsCommandsLabel;
private JPanel sapforConfigurationCommandsPanel; private JPanel sapforConfigurationCommandsPanel;
private JPanel sapforPackagesPanel;
private JLabel sapforTasksPackagesLabel; private JLabel sapforTasksPackagesLabel;
private JLabel sapforTasksLabel; private JLabel sapforTasksLabel;
private JPanel groupsBackground; private JPanel groupsBackground;
private JPanel sapforScenariosPanel; private JPanel sapforScenariosPanel;
private JPanel serverSapforsPanel; private JPanel serverSapforsPanel;
private JPanel sapforTasksPackagesPanel;
private JPanel testsRunTasksBackground; private JPanel testsRunTasksBackground;
private JCheckBox filterFinished; private JCheckBox filterFinished;
private JButton bTest; private JButton bTest;
@@ -146,16 +146,14 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
Global.testingServer.db.tests.mountUI(testsPanel); Global.testingServer.db.tests.mountUI(testsPanel);
Global.testingServer.account_db.packages.mountUI(packagesPanel); Global.testingServer.account_db.packages.mountUI(packagesPanel);
Global.testingServer.account_db.testRunTasks.mountUI(testsRunTasksPanel); Global.testingServer.account_db.testRunTasks.mountUI(testsRunTasksPanel);
// Global.testingServer.account_db.testRunTasks.setFilterUI(count -> tasksMatchesLabel.setText(String.valueOf(count)));
//-- //--
Global.testingServer.db.sapforConfigurations.mountUI(sapforConfigurationsPanel); Global.testingServer.db.sapforConfigurations.mountUI(sapforConfigurationsPanel);
Global.testingServer.db.sapforConfigurationCommands.mountUI(sapforConfigurationCommandsPanel); Global.testingServer.db.sapforConfigurationCommands.mountUI(sapforConfigurationCommandsPanel);
Global.testingServer.db.serverSapfors.mountUI(serverSapforsPanel); Global.testingServer.db.serverSapfors.mountUI(serverSapforsPanel);
// Global.testingServer.db.sapforTasksPackages.mountUI(sapforScenariosPanel); // Global.testingServer.db.sapforTasksPackages.mountUI(sapforScenariosPanel);
// Global.testingServer.db.sapforTasksPackages.mountUI(sapforPackagesPanel); // Global.testingServer.db.sapforTasksPackages.mountUI(sapforPackagesPanel);
//Global.db.sapforTasks.mountUI(sapforTasksPanel); //Global.db.sapforTasks.mountUI(sapforTasksPanel);
// Global.testingServer.account_db.sapforTasksPackages.mountUI(sapforPackagesPanel); Global.testingServer.account_db.sapforTasksPackages.mountUI(sapforTasksPackagesPanel);
// Global.testingServer.account_db.sapforTasks.mountUI(sapforTasksPanel); // Global.testingServer.account_db.sapforTasks.mountUI(sapforTasksPanel);
//--------------------------------------------------------------------->>>> //--------------------------------------------------------------------->>>>
/* /*
@@ -186,10 +184,11 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
this.RestoreLastCredentials(); this.RestoreLastCredentials();
Global.testingServer.db.configurations.ShowUI(); Global.testingServer.db.configurations.ShowUI();
Global.testingServer.db.groups.ShowUI(); Global.testingServer.db.groups.ShowUI();
Global.testingServer.account_db.packages.ShowUI();
Global.testingServer.db.serverSapfors.ShowUI(); Global.testingServer.db.serverSapfors.ShowUI();
Global.testingServer.db.sapforConfigurations.ShowUI(); Global.testingServer.db.sapforConfigurations.ShowUI();
// Global.testingServer.db.sapforTasksPackages.ShowUI(); //----
Global.testingServer.account_db.packages.ShowUI();
Global.testingServer.account_db.sapforTasksPackages.ShowUI();
} }
//- //-
@Override @Override
@@ -226,7 +225,6 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
@Override @Override
public void ShowProject() { public void ShowProject() {
testingTabs.setEnabledAt(1, true); testingTabs.setEnabledAt(1, true);
// testingTabs.setSelectedIndex(0);
//- //-
ShowSession(); ShowSession();
//- //-
@@ -323,8 +321,11 @@ public class TestingForm implements FormWithSplitters, TestingWindow {
public void RemountTestTable() { public void RemountTestTable() {
UI.Clear(packagesPanel); UI.Clear(packagesPanel);
UI.Clear(testsRunTasksPanel); UI.Clear(testsRunTasksPanel);
UI.Clear(sapforTasksPackagesPanel);
//-->>
Global.testingServer.account_db.packages.mountUI(packagesPanel); Global.testingServer.account_db.packages.mountUI(packagesPanel);
Global.testingServer.account_db.testRunTasks.mountUI(testsRunTasksPanel); Global.testingServer.account_db.testRunTasks.mountUI(testsRunTasksPanel);
Global.testingServer.account_db.sapforTasksPackages.mountUI(sapforTasksPackagesPanel);
} }
@Override @Override
public void setUserRights() { public void setUserRights() {