no message

This commit is contained in:
2023-10-04 22:01:09 +03:00
parent 2a0a5f38b1
commit 2f0d01b9f3
51 changed files with 146 additions and 94 deletions

52
.idea/workspace.xml generated
View File

@@ -8,8 +8,56 @@
<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/SapforTestingSystem/SapforScenario/SapforScenario.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforScenario/SapforScenario.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/Common/Constants/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Constants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Database/Database.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Database/Database.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Database/iDBObject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Database/iDBObject.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/UI/DataSetControlForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/DataSetControlForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/UI/Menus/TableMenu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Menus/TableMenu.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/UI/Tables/ColumnInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/UI/Tables/ColumnInfo.java" 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/Common/Utils/Utils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/Utils.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Utils/Validators/PathValidator.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/Validators/PathValidator.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Utils/Validators/ShellParser.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Utils/Validators/ShellParser.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Credentials/Credentials.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Credentials/Credentials.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/EnvironmentValue/EnvironmentValue.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/EnvironmentValue/EnvironmentValue.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Machine/Machine.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Machine/Machine.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Module/Module.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Module/Module.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Module/ModuleAnchestor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Module/ModuleAnchestor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Module/UI/ModuleAnchestorForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Module/UI/ModuleAnchestorForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/RunConfiguration/RunConfiguration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/RunConfiguration/RunConfiguration.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/RunConfiguration/RunConfigurationsDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/RunConfiguration/RunConfigurationsDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/SapforProfileSetting/SapforProfileSetting.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/SapforProfileSetting/SapforProfileSetting.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Splitter/Splitter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Splitter/Splitter.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/CompilationTask/CompilationTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/CompilationTask/CompilationTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/RunTask/RunTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/RunTask/RunTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Local/Linux/LinuxLocalTaskSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Local/Linux/LinuxLocalTaskSupervisor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Local/LocalTaskSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Local/LocalTaskSupervisor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Remote/RemoteTaskSupervisor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/Supervisor/Remote/RemoteTaskSupervisor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/Tasks/Task.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/Tasks/Task.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/GlobalData/User/User.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/GlobalData/User/User.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ProjectData/Files/DBProjectFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Files/DBProjectFile.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/ProjectData/Project/db_project_info.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/ProjectData/Project/db_project_info.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Repository/Component/Component.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Component.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Repository/Component/Sapfor/Sapfor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Component/Sapfor/Sapfor.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/SapforServerScenario_info.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforServerScenario_info.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/SapforTasksPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTasksPackage/SapforTasksPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTestingPlaner/SapforTestingPlanner.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/SapforTestingPlaner/SapforTestingPlanner.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/SapforTestingSystem/ThreadTask/ThreadTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/SapforTestingSystem/ThreadTask/ThreadTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Tasks/TestRunTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Tasks/TestRunTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Tasks/TestTask.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Tasks/TestTask.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/TestingSystem/TestsSupervisor_2022/TestsSupervisor_2022.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/TestsSupervisor_2022/TestsSupervisor_2022.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddFile.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/AddFile.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/DownloadRepository.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/OpenSapforTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/OpenSapforTest.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/PickCompilerEnvironments.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/PickCompilerEnvironments.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/Precompilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/Precompilation.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/ProcessPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/ProcessPass.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ComparisonForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/ComparisonForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/FileForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/UI/Main/FileForm.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" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -1,4 +1,4 @@
package Common.Constants;
package Common;
import GlobalData.Machine.Machine;
import GlobalData.Machine.MachineType;
import GlobalData.User.User;
@@ -12,6 +12,15 @@ public class Constants {
public static final String SAPFOR_REPOSITORY = "http://svn.dvm-system.org/svn/dvmhrepo/sapfor";
//--
public static final String LOADED = "LOADED";
//--файлы-признаки
public static final String ABORTED = "ABORTED";
public static final String INTERRUPT = "INTERRUPT"; //файл признак прерывания.
public final static String DONE = "DONE";
public final static String TIMEOUT = "TIMEOUT";
//- вывод задач
public final static String out_file = "out.txt";
public final static String err_file = "err.txt";
public final static String time_file = "total_time";
//--
//https://losst.ru/komandy-terminala-linux
public static String[] linux_system_commands = new String[]{

View File

@@ -1,5 +1,5 @@
package Common.Database;
import Common.Constants.Constants;
import Common.Constants;
import Common.Global;
import Common.Utils.Utils;
import Repository.RepositoryRefuseException;

View File

@@ -1,5 +1,5 @@
package Common.Database;
import Common.Constants.Constants;
import Common.Constants;
import com.sun.org.glassfish.gmbal.Description;
//автоинкрементальный ключ
public class iDBObject extends DBObject {

View File

@@ -1,5 +1,5 @@
package Common.UI;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Database.DBObject;
import Common.Database.DBTable;

View File

@@ -1,5 +1,5 @@
package Common.UI.Menus;
import Common.Constants.Constants;
import Common.Constants;
import Common.Utils.Utils;
import javax.swing.*;

View File

@@ -1,5 +1,5 @@
package Common.UI.Tables;
import Common.Constants.Constants;
import Common.Constants;
public class ColumnInfo {
private String Name = "?";
private boolean visible = true;

View File

@@ -1,5 +1,5 @@
package Common.Utils;
import ProjectData.Project.db_project_info;
import Common.Constants;
import org.apache.commons.io.FileUtils;
import java.io.File;
@@ -8,14 +8,14 @@ public class InterruptThread extends Thread{
//------------
public InterruptThread(int sleep_ms, Callable action){
super(() -> {
File interruptFile = new File(db_project_info.interrupt);
File interruptFile = new File(Constants.INTERRUPT);
try {
while (true) {
Thread.sleep(sleep_ms);
if (interruptFile.exists()) {
FileUtils.writeStringToFile(new File("ABORTED"), "");
FileUtils.forceDelete(interruptFile);
action.call();
FileUtils.writeStringToFile(new File(Constants.ABORTED), "");
FileUtils.forceDelete(interruptFile);
}
}
} catch (Exception ex) {

View File

@@ -1,5 +1,5 @@
package Common.Utils;
import Common.Constants.Constants;
import Common.Constants;
import Common.Global;
import Common.UI.UI;
import ProjectData.Files.DBProjectFile;

View File

@@ -1,5 +1,5 @@
package Common.Utils.Validators;
import Common.Constants.Constants;
import Common.Constants;
import Common.Utils.TextLog;
import Common.Utils.Utils;
import org.fife.ui.rsyntaxtextarea.RSyntaxUtilities;

View File

@@ -1,5 +1,5 @@
package Common.Utils.Validators;
import Common.Constants.Constants;
import Common.Constants;
import Common.Global;
import Common.Utils.Utils;

View File

@@ -1,5 +1,5 @@
package GlobalData.Credentials;
import Common.Constants.Constants;
import Common.Constants;
import Common.Database.iDBObject;
import com.sun.org.glassfish.gmbal.Description;
public class Credentials extends iDBObject {

View File

@@ -1,5 +1,5 @@
package GlobalData.EnvironmentValue;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Database.iDBObject;
import Common.Utils.Utils;

View File

@@ -1,5 +1,5 @@
package GlobalData.Machine;
import Common.Constants.Constants;
import Common.Constants;
import Common.Database.iDBObject;
import Common.Global;
import Common.Utils.Utils;

View File

@@ -1,5 +1,5 @@
package GlobalData.Module;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Global;
import GlobalData.Makefile.Makefile;

View File

@@ -1,5 +1,5 @@
package GlobalData.Module;
import Common.Constants.Constants;
import Common.Constants;
import Common.Database.iDBObject;
import Common.Global;
import Common.Utils.Utils;

View File

@@ -1,5 +1,5 @@
package GlobalData.Module.UI;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.UI.UI;
import Common.UI.Windows.Dialog.DBObjectDialog;

View File

@@ -1,5 +1,5 @@
package GlobalData.RunConfiguration;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Database.iDBObject;
import Common.Global;

View File

@@ -1,5 +1,5 @@
package GlobalData.RunConfiguration;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Database.*;
import Common.Global;

View File

@@ -1,5 +1,5 @@
package GlobalData.SapforProfileSetting;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Database.iDBObject;
import GlobalData.Settings.SettingName;

View File

@@ -1,5 +1,5 @@
package GlobalData.Splitter;
import Common.Constants.Constants;
import Common.Constants;
import Common.Database.DBObject;
import com.sun.org.glassfish.gmbal.Description;

View File

@@ -1,5 +1,5 @@
package GlobalData.Tasks.CompilationTask;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Global;
import Common.Utils.Utils;

View File

@@ -1,5 +1,5 @@
package GlobalData.Tasks.RunTask;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Global;
import Common.Utils.StringTemplate;

View File

@@ -1,10 +1,10 @@
package GlobalData.Tasks.Supervisor.Local.Linux;
import Common.Constants;
import Common.Utils.Utils;
import GlobalData.Tasks.Supervisor.Local.LocalTaskSupervisor;
import GlobalData.Tasks.Task;
import GlobalData.Tasks.TaskState;
import GlobalData.User.User;
import ProjectData.Project.db_project_info;
import Visual_DVM_2021.Passes.PassException;
import java.io.File;
@@ -59,13 +59,13 @@ public abstract class LinuxLocalTaskSupervisor<T extends Task> extends LocalTask
}
}
protected File getProjectTime() {
return Paths.get(getProjectCopy().getAbsolutePath(), db_project_info.time_file).toFile();
return Paths.get(getProjectCopy().getAbsolutePath(), Constants.time_file).toFile();
}
protected File getDONE_file() {
return Paths.get(getProjectCopy().getAbsolutePath(), db_project_info.DONE).toFile();
return Paths.get(getProjectCopy().getAbsolutePath(), Constants.DONE).toFile();
}
protected File getTIMEOUT_file() {
return Paths.get(getProjectCopy().getAbsolutePath(), db_project_info.TIMEOUT).toFile();
return Paths.get(getProjectCopy().getAbsolutePath(), Constants.TIMEOUT).toFile();
}
@Override
protected void PrepareWorkspace() throws Exception {

View File

@@ -1,12 +1,11 @@
package GlobalData.Tasks.Supervisor.Local;
import Common.Constants.Constants;
import Common.Constants;
import Common.Global;
import Common.Utils.Utils;
import GlobalData.Tasks.RunTask.RunTask;
import GlobalData.Tasks.Supervisor.TaskSupervisor;
import GlobalData.Tasks.Task;
import GlobalData.Tasks.TaskState;
import ProjectData.Project.db_project_info;
import Visual_DVM_2021.Passes.Pass_2021;
import org.apache.commons.io.FileUtils;
@@ -47,10 +46,10 @@ public abstract class LocalTaskSupervisor<T extends Task> extends TaskSupervisor
return Paths.get(getProjectCopy().getAbsolutePath(), "0" + (Global.isWindows ? ".exe" : "")).toFile();
}
protected File getProjectOutput() {
return Paths.get(getProjectCopy().getAbsolutePath(), db_project_info.out_file).toFile();
return Paths.get(getProjectCopy().getAbsolutePath(), Constants.out_file).toFile();
}
protected File getProjectErrors() {
return Paths.get(getProjectCopy().getAbsolutePath(), db_project_info.err_file).toFile();
return Paths.get(getProjectCopy().getAbsolutePath(), Constants.err_file).toFile();
}
@Override
protected void PrepareWorkspace() throws Exception {

View File

@@ -1,10 +1,10 @@
package GlobalData.Tasks.Supervisor.Remote;
import Common.Constants;
import Common.Utils.Utils;
import GlobalData.RemoteFile.RemoteFile;
import GlobalData.Tasks.Supervisor.TaskSupervisor;
import GlobalData.Tasks.Task;
import GlobalData.Tasks.TaskState;
import ProjectData.Project.db_project_info;
import Visual_DVM_2021.Passes.SSH.ConnectionPass;
public abstract class RemoteTaskSupervisor<T extends Task> extends TaskSupervisor<T, ConnectionPass> {
protected RemoteFile getRemoteProjectsPath() {
@@ -17,19 +17,19 @@ public abstract class RemoteTaskSupervisor<T extends Task> extends TaskSuperviso
return new RemoteFile(getRemoteProject().full_name, "0");
}
protected RemoteFile getRemoteTime() {
return new RemoteFile(getRemoteProject().full_name, db_project_info.time_file);
return new RemoteFile(getRemoteProject().full_name, Constants.time_file);
}
protected RemoteFile getRemoteOutput() {
return new RemoteFile(getRemoteProject().full_name, db_project_info.out_file);
return new RemoteFile(getRemoteProject().full_name, Constants.out_file);
}
protected RemoteFile getRemoteErrors() {
return new RemoteFile(getRemoteProject().full_name, db_project_info.err_file);
return new RemoteFile(getRemoteProject().full_name, Constants.err_file);
}
public RemoteFile getDONE_file() {
return new RemoteFile(getRemoteProject().full_name, db_project_info.DONE);
return new RemoteFile(getRemoteProject().full_name, Constants.DONE);
}
public RemoteFile getTIMEOUT_file() {
return new RemoteFile(getRemoteProject().full_name, db_project_info.TIMEOUT);
return new RemoteFile(getRemoteProject().full_name, Constants.TIMEOUT);
}
@Override
protected void PrepareWorkspace() throws Exception {
@@ -42,9 +42,9 @@ public abstract class RemoteTaskSupervisor<T extends Task> extends TaskSuperviso
}
@Override
protected void CheckTask() throws Exception {
if (pass.Exists(getRemoteProject().full_name, db_project_info.DONE))
if (pass.Exists(getRemoteProject().full_name, Constants.DONE))
task.state = TaskState.Finished;
else if (pass.Exists(getRemoteProject().full_name, db_project_info.TIMEOUT))
else if (pass.Exists(getRemoteProject().full_name, Constants.TIMEOUT))
task.state = TaskState.AbortedByTimeout;
}
@Override

View File

@@ -1,5 +1,5 @@
package GlobalData.Tasks;
import Common.Constants.Constants;
import Common.Constants;
import Common.Database.iDBObject;
import Common.Global;
import Common.Utils.Utils;
@@ -52,13 +52,13 @@ public abstract class Task extends iDBObject {
return Paths.get(getHome().getAbsolutePath(), String.valueOf(id)).toFile();
}
public File getOutputFile() {
return Paths.get(getLocalWorkspace().getAbsolutePath(), db_project_info.out_file).toFile();
return Paths.get(getLocalWorkspace().getAbsolutePath(), Constants.out_file).toFile();
}
public File getErrorsFile() {
return Paths.get(getLocalWorkspace().getAbsolutePath(), db_project_info.err_file).toFile();
return Paths.get(getLocalWorkspace().getAbsolutePath(), Constants.err_file).toFile();
}
public File getTimeFile() {
return Paths.get(getLocalWorkspace().getAbsolutePath(), db_project_info.time_file).toFile();
return Paths.get(getLocalWorkspace().getAbsolutePath(), Constants.time_file).toFile();
}
public abstract String getFullCommand();
public Date getEndDate() {

View File

@@ -1,5 +1,5 @@
package GlobalData.User;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Database.iDBObject;
import GlobalData.Machine.Machine;

View File

@@ -1,4 +1,5 @@
package ProjectData.Files;
import Common.Constants;
import Common.Current;
import Common.Database.DBObject;
import Common.Global;
@@ -146,15 +147,15 @@ public class DBProjectFile extends DBObject {
public void AutoDetectProperties() {
//проверка запретных имен.
String[] forbiddenNames = new String[]{
db_project_info.interrupt,
Constants.INTERRUPT,
db_project_info.launch_script_name,
db_project_info.default_binary_name,
//--
db_project_info.DONE,
db_project_info.TIMEOUT,
db_project_info.out_file,
db_project_info.err_file,
db_project_info.time_file,
Constants.DONE,
Constants.TIMEOUT,
Constants.out_file,
Constants.err_file,
Constants.time_file,
"Makefile"
};
for (String forbidden : forbiddenNames) {

View File

@@ -1,5 +1,5 @@
package ProjectData.Project;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Database.DBObject;
import Common.Global;
@@ -49,8 +49,6 @@ import java.util.*;
import java.util.stream.Collectors;
public class db_project_info extends DBObject {
public static Vector<db_project_info> newVersions = new Vector<>();
//--
public static final String interrupt = "INTERRUPT";
public static final String launch_script_name = "run";
public static final String default_binary_name = "0";
public static final String data = "visualiser_data";
@@ -61,12 +59,6 @@ public class db_project_info extends DBObject {
public static final String statistic = "statistic";
private static final String unknown_metric = "";
//--
public final static String DONE = "DONE";
public final static String TIMEOUT = "TIMEOUT";
public final static String out_file = "out.txt";
public final static String err_file = "err.txt";
public final static String time_file = "total_time";
//--
public DefaultMutableTreeNode align_rules_root = new DefaultMutableTreeNode("");
public DefaultMutableTreeNode includes_root = new DefaultMutableTreeNode("");
//-
@@ -719,7 +711,7 @@ public class db_project_info extends DBObject {
return true;
}
public File getInterruptFile() {
return Paths.get(getDataDirectory().getAbsolutePath(), interrupt).toFile();
return Paths.get(getDataDirectory().getAbsolutePath(), Constants.INTERRUPT).toFile();
}
public void CleanInterruptFile() throws Exception {
File file = getInterruptFile();

View File

@@ -1,5 +1,5 @@
package Repository.Component;
import Common.Constants.Constants;
import Common.Constants;
import Common.Database.DBObject;
import Common.Global;
import Common.Utils.Files.VFileChooser;

View File

@@ -1,5 +1,5 @@
package Repository.Component.Sapfor;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Global;
import Common.UI.UI;

View File

@@ -1,5 +1,5 @@
package SapforTestingSystem;
import Common.Constants.Constants;
import Common.Constants;
import Common.Global;
import Common.Utils.Utils;
import GlobalData.Tasks.TaskState;

View File

@@ -1,5 +1,5 @@
package SapforTestingSystem;
import Common.Constants.Constants;
import Common.Constants;
import com.google.gson.annotations.Expose;
import java.io.Serializable;

View File

@@ -1,5 +1,5 @@
package SapforTestingSystem.SapforTask;
import Common.Constants.Constants;
import Common.Constants;
import Common.Database.DBObject;
import GlobalData.Tasks.TaskState;
import SapforTestingSystem.Json.SapforVersion_json;

View File

@@ -1,5 +1,5 @@
package SapforTestingSystem.SapforTasksPackage;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Database.DBObject;
import Common.Database.iDBObject;

View File

@@ -1,4 +1,5 @@
package SapforTestingSystem.SapforTestingPlaner;
import Common.Constants;
import Common.Global;
import Common.Utils.Utils;
import SapforTestingSystem.Json.SapforConfiguration_json;
@@ -7,6 +8,7 @@ import SapforTestingSystem.Json.PackageModeScenario_json;
import SapforTestingSystem.PerformSapforTask;
import SapforTestingSystem.SapforTask.SapforTask;
import SapforTestingSystem.ThreadsPlanner.ThreadsPlanner;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.util.Date;
@@ -43,6 +45,7 @@ public class SapforTestingPlanner extends ThreadsPlanner {
Process killer = Runtime.getRuntime().exec(kill_command);
killer.waitFor();
System.out.println("done!");
//todo для надежности сделать еще один kill с внешнего процесса.
// может быть гонка, что нить успеет запустить процесс уже после интеррупта.
}
@@ -54,14 +57,14 @@ public class SapforTestingPlanner extends ThreadsPlanner {
try {
System.out.println("Запись результатов");
Utils.jsonToFile(results_json, new File(Global.Home, "results"));
System.out.println("Очистка служебных файлов");
// System.out.println("Очистка служебных файлов");
//тут же и строить версии.
Utils.deleteFilesByExtensions(new File(Global.Home),"proj","dep", "bat");
System.out.println("Нажмите любую клавишу для выхода...");
System.in.read();
// Utils.deleteFilesByExtensions(new File(Global.Home),"proj","dep", "bat");
FileUtils.writeStringToFile(new File(Constants.DONE), "");
} catch (Exception e) {
Global.Log.PrintException(e);
}
System.exit(0);
}
}

View File

@@ -1,5 +1,5 @@
package SapforTestingSystem.ThreadTask;
import Common.Constants.Constants;
import Common.Constants;
public class ThreadTask {
public int id = Constants.Nan;
public Thread thread;

View File

@@ -1,5 +1,5 @@
package TestingSystem.Tasks;
import Common.Constants.Constants;
import Common.Constants;
import Common.Database.DBObject;
import GlobalData.Tasks.TaskState;
import ProjectData.LanguageName;

View File

@@ -1,5 +1,5 @@
package TestingSystem.Tasks;
import Common.Constants.Constants;
import Common.Constants;
import Common.Database.DBObject;
import GlobalData.Tasks.TaskState;
import TestingSystem.Configuration.Configuration;

View File

@@ -1,9 +1,9 @@
package TestingSystem.TestsSupervisor_2022;
import Common.Constants;
import Common.Global;
import Common.Utils.Utils;
import GlobalData.RemoteFile.RemoteFile;
import GlobalData.Tasks.TaskState;
import ProjectData.Project.db_project_info;
import Repository.Server.ServerCode;
import TestingSystem.Tasks.TestCompilationTask;
import TestingSystem.Tasks.TestRunTask;
@@ -198,9 +198,9 @@ public class TestsSupervisor_2022 {
RemoteFile taskRemoteWorkspace = new RemoteFile(packageRemoteWorkspace.full_name, String.valueOf(testTask.id));
Utils.CheckDirectory(taskLocalWorkspace);
if (connection.Exists(packageRemoteWorkspace.full_name, String.valueOf(testTask.id))) {
CheckTaskFile(taskRemoteWorkspace, taskLocalWorkspace, db_project_info.out_file);
CheckTaskFile(taskRemoteWorkspace, taskLocalWorkspace, db_project_info.err_file);
CheckTaskFile(taskRemoteWorkspace, taskLocalWorkspace, db_project_info.time_file);
CheckTaskFile(taskRemoteWorkspace, taskLocalWorkspace, Constants.out_file);
CheckTaskFile(taskRemoteWorkspace, taskLocalWorkspace, Constants.err_file);
CheckTaskFile(taskRemoteWorkspace, taskLocalWorkspace, Constants.time_file);
CheckTaskFile(taskRemoteWorkspace, taskLocalWorkspace, "TaskState");
if (testTask instanceof TestRunTask)
CheckTaskFile(taskRemoteWorkspace, taskLocalWorkspace, "sts.gz+");
@@ -302,9 +302,9 @@ public class TestsSupervisor_2022 {
File taskWorkspace = Paths.get(packageLocalWorkspace.getAbsolutePath(), String.valueOf(testTask.id)).toFile();
System.out.println("id=" + testTask.id + ": path=" + taskWorkspace.getAbsolutePath());
File stateFile = Paths.get(taskWorkspace.getAbsolutePath(), "TaskState").toFile();
File outFile = Paths.get(taskWorkspace.getAbsolutePath(), db_project_info.out_file).toFile();
File errFile = Paths.get(taskWorkspace.getAbsolutePath(), db_project_info.err_file).toFile();
File timeFile = Paths.get(taskWorkspace.getAbsolutePath(), db_project_info.time_file).toFile();
File outFile = Paths.get(taskWorkspace.getAbsolutePath(), Constants.out_file).toFile();
File errFile = Paths.get(taskWorkspace.getAbsolutePath(), Constants.err_file).toFile();
File timeFile = Paths.get(taskWorkspace.getAbsolutePath(), Constants.time_file).toFile();
if (outFile.exists())
testTask.output = FileUtils.readFileToString(outFile);
if (errFile.exists())

View File

@@ -1,5 +1,5 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.UI.UI;
import Common.UI.Windows.Dialog.Text.FileNameForm;

View File

@@ -1,5 +1,5 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants.Constants;
import Common.Constants;
import Common.Global;
import Common.Utils.Utils;
import Visual_DVM_2021.Passes.ProcessPass;

View File

@@ -1,5 +1,5 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants.Constants;
import Common.Constants;
import Common.Global;
import Common.Utils.Utils;
import GlobalData.RemoteFile.RemoteFile;

View File

@@ -1,5 +1,5 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Utils.Utils;
import ProjectData.Files.DBProjectFile;

View File

@@ -1,5 +1,5 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Global;
import Common.UI.Windows.Dialog.Dialog;

View File

@@ -1,5 +1,5 @@
package Visual_DVM_2021.Passes.All;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Global;
import Common.UI.UI;

View File

@@ -1,5 +1,5 @@
package Visual_DVM_2021.Passes;
import Common.Constants.Constants;
import Common.Constants;
import Common.Global;
import Common.Utils.Utils;

View File

@@ -1,5 +1,5 @@
package Visual_DVM_2021.UI.Main;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Database.DBObject;
import Common.Global;

View File

@@ -1,5 +1,5 @@
package Visual_DVM_2021.UI.Main;
import Common.Constants.Constants;
import Common.Constants;
import Common.Global;
import Common.UI.Editor.Viewer;
import Common.UI.Menus_2023.FileMenuBar.FileMenuBar;

View File

@@ -1,5 +1,5 @@
package Visual_DVM_2021.UI.Main;
import Common.Constants.Constants;
import Common.Constants;
import Common.Current;
import Common.Global;
import Common.UI.Menus_2023.TasksPackagesMenuBar.TasksPackagesMenuBar;