This commit is contained in:
2025-02-15 23:30:48 +03:00
parent 68bd1ef6b4
commit 77179789f5
24 changed files with 51 additions and 64 deletions

22
.idea/workspace.xml generated
View File

@@ -8,9 +8,29 @@
<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$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Global.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Global.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/Global.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Global.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/EditAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/EditAccount.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ConvertCorrectnessTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/ConvertCorrectnessTests.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DVMConvertProject.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DVMConvertProject.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DetectSelectedTestsMinMaDim.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DetectSelectedTestsMinMaDim.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadAllBugReportsArchives.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadAllBugReportsArchives.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadDVMPackages.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadDVMPackages.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadRepository.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadRepository.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadSapforPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DownloadSapforPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/Email.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/Email.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/JoinSapforTestingVersionsToGroup.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/JoinSapforTestingVersionsToGroup.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/Server/ClientPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/Server/ClientPass.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/Testing/StartTestingPackage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/Testing/StartTestingPackage.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/RepositoryServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/RepositoryServer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Repository/TestingClient.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Repository/TestingClient.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Test/UI/TestsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/Test/UI/TestsForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestsDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestsDatabase.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMConfiguration/UI/DVMConfigurationsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMConfiguration/UI/DVMConfigurationsForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMPackage/UI/DVMPackagesForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/DVM/DVMPackage/UI/DVMPackagesForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationsForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforConfiguration/UI/SapforConfigurationsForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/UI/SapforPackagesForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/TestingSystem/SAPFOR/SapforPackage/UI/SapforPackagesForm.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

@@ -1,6 +1,6 @@
{ {
"Workspace": "E:\\Tests", "Workspace": "E:\\Tests",
"ProjectsSearchDirectory": "E:\\BUG", "ProjectsSearchDirectory": "E:\\Tests\\Downloads",
"VisualiserPath": "C:\\Users\\misha\\Downloads", "VisualiserPath": "C:\\Users\\misha\\Downloads",
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F", "Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",
"Visualizer_2Path": "C:\\Users\\misha\\Documents", "Visualizer_2Path": "C:\\Users\\misha\\Documents",
@@ -23,9 +23,9 @@
"CheckTestingIntervalSeconds": 10, "CheckTestingIntervalSeconds": 10,
"AutoCheckTesting": true, "AutoCheckTesting": true,
"EmailOnTestingProgress": true, "EmailOnTestingProgress": true,
"lastMachineId": 13, "lastMachineId": 28,
"lastUserId": 24, "lastUserId": 36,
"lastCompilerId": 52, "lastCompilerId": 107,
"RegisterOn": false, "RegisterOn": false,
"SpacesOn": false, "SpacesOn": false,
"EmptyLinesOn": false, "EmptyLinesOn": false,

View File

@@ -3,7 +3,7 @@ import Common.Utils.Vector_;
import java.util.Vector; import java.util.Vector;
public class Constants { public class Constants {
public static final int version = 1168; public static final int version = 1171;
public static final int planner_version = 6; public static final int planner_version = 6;
public static final int testingMaxKernels = 64; //вообще говоря, это параметр машины. public static final int testingMaxKernels = 64; //вообще говоря, это параметр машины.
//-- //--
@@ -45,7 +45,7 @@ public class Constants {
public static final int MailSocketPort = 465; public static final int MailSocketPort = 465;
public static final int ComponentsServerPort = 7995; public static final int ComponentsServerPort = 7995;
public static final int TestingServerPort = 7998; public static final int TestingServerPort = 7998;
public static final int SocketTimeout = 5000; public static final int SocketTimeout = 0;
//- //-
public static final String ServerAddress = "alex-freenas.ddns.net"; public static final String ServerAddress = "alex-freenas.ddns.net";
public static final String ServerUserName = "testuser"; public static final String ServerUserName = "testuser";

View File

@@ -197,6 +197,7 @@ public class Global {
//light_editor.xml-------->> //light_editor.xml-------->>
mainModule.ActivateDB(); mainModule.ActivateDB();
/* /*
https://habr.com/ru/articles/446888/ сертификат?
mainModule.set(Current.Account, new Account() { mainModule.set(Current.Account, new Account() {
{ {
name = "M"; name = "M";

View File

@@ -18,13 +18,8 @@ public class ConvertCorrectnessTests extends TestingServerPass<File> {
Log.Writeln_("Вы не являетесь администратором"); Log.Writeln_("Вы не являетесь администратором");
return false; return false;
} }
if (!Global.testingServer.db.serverSapfors.getUI().CheckCurrent(Log)) {
return false;
}
return UI.Warning("Загрузить полный пакет DVM тестов на корректность и производительность.")&& return UI.Warning("Загрузить полный пакет DVM тестов на корректность и производительность.")&&
SendRequest(ServerCode.RefreshDVMTests, SendRequest(ServerCode.RefreshDVMTests, "", Global.mainModule.getAccount());
String.valueOf(
Global.testingServer.db.serverSapfors.getUI().getCurrent().id), Global.mainModule.getAccount(),0);
} }
@Override @Override
protected boolean needsAnimation() { protected boolean needsAnimation() {

View File

@@ -72,7 +72,7 @@ public class DVMConvertProject extends ComponentsServerPass<db_project_info> {
unit_args.add(target.languageName.toString()); unit_args.add(target.languageName.toString());
unit_args.add(target.sapforProperties.DVMConvertationOptions); unit_args.add(target.sapforProperties.DVMConvertationOptions);
unit_args.addAll(programsNames); unit_args.addAll(programsNames);
return SendRequest(ServerCode.DVMConvertProject, String.join("\n", unit_args),Utils_.fileToBytes(archive),0); return SendRequest(ServerCode.DVMConvertProject, String.join("\n", unit_args),Utils_.fileToBytes(archive));
//-- //--
} }
return false; return false;

View File

@@ -16,7 +16,7 @@ public class DetectSelectedTestsMinMaDim extends TestingServerPass<Vector<Object
if (!Global.testingServer.db.tests.getUI().CheckSelectedOrCurrent(Log)) if (!Global.testingServer.db.tests.getUI().CheckSelectedOrCurrent(Log))
return false; return false;
target=Global.testingServer.db.tests.getUI().getSelectedOrCurrentKeys(); target=Global.testingServer.db.tests.getUI().getSelectedOrCurrentKeys();
return SendRequest(ServerCode.DetectTestsMinMaxDim, "",target, 0); return SendRequest(ServerCode.DetectTestsMinMaxDim, "",target);
} }
@Override @Override
protected void performDone() throws Exception { protected void performDone() throws Exception {

View File

@@ -22,7 +22,7 @@ public class DownloadAllBugReportsArchives extends ComponentsServerPass<File> {
} }
@Override @Override
protected boolean canStart(Object... args) throws Exception { protected boolean canStart(Object... args) throws Exception {
return SendRequest(ServerCode.ReceiveAllArchives, "", null, 60000); return SendRequest(ServerCode.ReceiveAllArchives, "", null);
} }
@Override @Override
protected void body() throws Exception { protected void body() throws Exception {

View File

@@ -30,7 +30,7 @@ public class DownloadDVMPackages extends TestingServerPass<Vector<Integer>> {
protected boolean canStart(Object... args) throws Exception { protected boolean canStart(Object... args) throws Exception {
target = (Vector<Integer>) args[0]; target = (Vector<Integer>) args[0];
packed_packages = null; packed_packages = null;
return SendRequest(ServerCode.DownloadDVMPackages, "", target,0 ); return SendRequest(ServerCode.DownloadDVMPackages, "", target);
} }
@Override @Override
protected void body() throws Exception { protected void body() throws Exception {

View File

@@ -12,6 +12,10 @@ public class DownloadRepository extends ProcessPass {
File dvmHome; File dvmHome;
File sapforHome; File sapforHome;
@Override @Override
public String getDescription() {
return "Загрузка репозитория";
}
@Override
protected boolean canStart(Object... args) throws Exception { protected boolean canStart(Object... args) throws Exception {
dvmHome = Paths.get(Global.RepoDirectory.getAbsolutePath(), dvmHome = Paths.get(Global.RepoDirectory.getAbsolutePath(),
"dvm").toFile(); "dvm").toFile();

View File

@@ -23,7 +23,7 @@ public class DownloadSapforPackage extends TestingServerPass<SapforPackage> {
} }
int id = target.id; int id = target.id;
loaded = new File(target.getLocalWorkspace(), CommonConstants.LOADED); loaded = new File(target.getLocalWorkspace(), CommonConstants.LOADED);
return !loaded.exists()&&SendRequest(ServerCode.DownloadSapforPackage, "", id, 0); return !loaded.exists()&&SendRequest(ServerCode.DownloadSapforPackage, "", id);
} }
@Override @Override
protected void body() throws Exception { protected void body() throws Exception {

View File

@@ -40,7 +40,7 @@ public class Email extends ComponentsServerPass<EmailMessage> {
int i = 0; int i = 0;
for (String address : recipients) { for (String address : recipients) {
ShowProgress(recipients.size(), i, true); ShowProgress(recipients.size(), i, true);
SendRequest(ServerCode.Email, address, target,0); SendRequest(ServerCode.Email, address, target);
++i; ++i;
} }
} }

View File

@@ -25,7 +25,7 @@ public class JoinSapforTestingVersionsToGroup extends TestingServerPass {
Log.Writeln_("Пакет не завершен!"); Log.Writeln_("Пакет не завершен!");
return false; return false;
} }
return SendRequest(ServerCode.JoinSapforVersionsToGroup, group.id+"\n"+sapforPackage.id, null, 0 ); return SendRequest(ServerCode.JoinSapforVersionsToGroup, group.id+"\n"+sapforPackage.id, null);
} }
return false; return false;
} }

View File

@@ -25,7 +25,7 @@ public abstract class ClientPass <S extends RepositoryServer,T> extends Pass<T>
return ""; return "";
} }
protected abstract S getServer(); protected abstract S getServer();
protected boolean SendRequest(ServerCode code_in, String arg_in, Serializable object_in, int delay){ protected boolean SendRequest(ServerCode code_in, String arg_in, Serializable object_in){
request = null; request = null;
request = new RepositoryPass(getServer()) { request = new RepositoryPass(getServer()) {
@Override @Override
@@ -38,7 +38,7 @@ public abstract class ClientPass <S extends RepositoryServer,T> extends Pass<T>
} }
@Override @Override
protected int getTimeout() { protected int getTimeout() {
return delay; return 0;
} }
@Override @Override
protected void ServerAction() throws Exception { protected void ServerAction() throws Exception {
@@ -55,9 +55,6 @@ public abstract class ClientPass <S extends RepositoryServer,T> extends Pass<T>
}; };
return request.Do(); return request.Do();
} }
protected boolean SendRequest(ServerCode code_in,String arg_in, Serializable object_in){
return SendRequest(code_in,arg_in, object_in, Constants.SocketTimeout);
}
protected boolean SendRequest(ServerCode code_in, String arg_in){ protected boolean SendRequest(ServerCode code_in, String arg_in){
return SendRequest(code_in,arg_in,null); return SendRequest(code_in,arg_in,null);
} }

View File

@@ -11,10 +11,6 @@ public abstract class StartTestingPackage<P extends TestingPackage> extends Publ
super(Global.testingServer, p_in); super(Global.testingServer, p_in);
} }
@Override @Override
protected int getTimeout() {
return 0;
}
@Override
public String getIconPath() { public String getIconPath() {
return "/Common/icons/BlueStart.png"; return "/Common/icons/BlueStart.png";
} }

View File

@@ -305,10 +305,6 @@ public abstract class RepositoryServer<D extends Database> {
return "Ping"; return "Ping";
} }
@Override @Override
protected int getTimeout() {
return 0;
}
@Override
protected void body() throws Exception { protected void body() throws Exception {
try { try {
super.body(); super.body();

View File

@@ -50,7 +50,7 @@ public abstract class TestingClient {
} }
@Override @Override
protected int getTimeout() { protected int getTimeout() {
return 120000; return 0;
} }
}; };
if (!pass.Do()) { if (!pass.Do()) {

View File

@@ -40,10 +40,6 @@ public class TestsForm extends DataSetControlForm<Test> {
public Class getRendererClass() { public Class getRendererClass() {
return RendererLongCell.class; return RendererLongCell.class;
} }
@Override
public int getMaxWidth() {
return 600;
}
}, },
new ColumnInfo<Test>("min_dim") { new ColumnInfo<Test>("min_dim") {
@Override @Override

View File

@@ -320,11 +320,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
} }
void RefreshDVMTests() throws Exception { void RefreshDVMTests() throws Exception {
Account account = (Account) request.object; Account account = (Account) request.object;
int sapfor_id = Integer.parseInt(request.arg); ServerSapfor serverSapfor = db.serverSapfors.getLastDoneVersion();
ServerSapfor sapfor = null;
if (!db.serverSapfors.containsKey(sapfor_id))
throw new RepositoryRefuseException("Версия SAPFOR с ключом " + sapfor_id + " не найдена.");
sapfor = db.serverSapfors.get(sapfor_id);
DownloadRepository downloadRepository = new DownloadRepository(); DownloadRepository downloadRepository = new DownloadRepository();
if (!downloadRepository.Do()) if (!downloadRepository.Do())
throw new RepositoryRefuseException("Не удалось обновить репозиторий"); throw new RepositoryRefuseException("Не удалось обновить репозиторий");
@@ -368,7 +364,7 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
//-теперь создать тесты. //-теперь создать тесты.
//-- //--
for (Pair<Group, Vector<File>> p : groups) for (Pair<Group, Vector<File>> p : groups)
db.RefreshGroup(account, sapfor, p); db.RefreshGroup(account, serverSapfor, p);
} }
void GetFirstActiveSapforPackages() throws Exception { void GetFirstActiveSapforPackages() throws Exception {
response.object = db.getFirstActiveSapforPackagesCopies(); response.object = db.getFirstActiveSapforPackagesCopies();

View File

@@ -196,10 +196,12 @@ public class TestsDatabase extends SQLiteDatabase {
FileUtils.forceMkdir(tempProject); FileUtils.forceMkdir(tempProject);
FileUtils.copyDirectory(testDirectory, tempProject); FileUtils.copyDirectory(testDirectory, tempProject);
//-- //--
if (Sapfor.getMinMaxDim(Sapfor.getTempCopy(new File(sapfor.call_command)), tempProject, test)) { if (sapfor!=null) {
Update(test); if (Sapfor.getMinMaxDim(Sapfor.getTempCopy(new File(sapfor.call_command)), tempProject, test)) {
} else Update(test);
throw new RepositoryRefuseException("Не удалось определить размерность теста " + Utils_.Brackets(test.description)); } else
throw new RepositoryRefuseException("Не удалось определить размерность теста " + Utils_.Brackets(test.description));
}
break; break;
case c: case c:
test.max_dim = Utils.getCTestMaxDim(testFile); test.max_dim = Utils.getCTestMaxDim(testFile);

View File

@@ -62,10 +62,6 @@ public class DVMConfigurationsForm extends DataSetControlForm<DVMConfiguration>
public Class getRendererClass() { public Class getRendererClass() {
return RendererMultiline.class; return RendererMultiline.class;
} }
@Override
public int getMaxWidth() {
return 700;
}
}, },
new ColumnInfo<DVMConfiguration>("тестов") { new ColumnInfo<DVMConfiguration>("тестов") {
@Override @Override

View File

@@ -50,10 +50,6 @@ public class DVMPackagesForm extends DataSetControlForm<DVMPackage> {
public Object getFieldAt(DVMPackage object) { public Object getFieldAt(DVMPackage object) {
return ((PackageCache) VisualCaches.GetCache(object)).getConfifurationsDescriptionsLine(); return ((PackageCache) VisualCaches.GetCache(object)).getConfifurationsDescriptionsLine();
} }
@Override
public int getMaxWidth() {
return 500;
}
}, },
new ColumnInfo<DVMPackage>("задач") { new ColumnInfo<DVMPackage>("задач") {
@Override @Override

View File

@@ -73,10 +73,6 @@ public class SapforConfigurationsForm extends DataSetControlForm<SapforConfigura
public Object getFieldAt(SapforConfiguration object) { public Object getFieldAt(SapforConfiguration object) {
return ((ConfigurationCache) VisualCaches.GetCache(object)).settingsSummary; return ((ConfigurationCache) VisualCaches.GetCache(object)).settingsSummary;
} }
@Override
public int getMaxWidth() {
return 500;
}
}, },
new ColumnInfo<SapforConfiguration>("группы") { new ColumnInfo<SapforConfiguration>("группы") {
@Override @Override

View File

@@ -38,10 +38,6 @@ public class SapforPackagesForm extends DataSetControlForm<SapforPackage> {
public Object getFieldAt(SapforPackage object) { public Object getFieldAt(SapforPackage object) {
return ((PackageCache) VisualCaches.GetCache(object)).getConfifurationsDescriptionsLine(); return ((PackageCache) VisualCaches.GetCache(object)).getConfifurationsDescriptionsLine();
} }
@Override
public int getMaxWidth() {
return 500;
}
}, },
new ColumnInfo<SapforPackage>("задач") { new ColumnInfo<SapforPackage>("задач") {
@Override @Override