no message

This commit is contained in:
2024-05-07 01:06:47 +03:00
parent b39de4ad14
commit 12fddbdc95
6 changed files with 51 additions and 10 deletions

View File

@@ -85,6 +85,6 @@ public enum ServerCode {
Ping,
GetFirstActiveDVMPackageForMachineURL,
GetServerName,
StartNecessaryMachines
;
StartNecessaryMachines,
GetSapforForCompilation;
}

View File

@@ -240,6 +240,10 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
response = new ServerExchangeUnit_2021(ServerCode.OK);
StartNecessaryMachines();
break;
case GetSapforForCompilation:
Print("Получить первую активную версию Sapfor для сборки");
GetSapforForCompilation();
break;
default:
throw new RepositoryRefuseException("Неподдерживаемый код: " + code);
}
@@ -325,6 +329,10 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
response.object = db.getFirstActiveSapforPackagesCopies();
}
//---
void GetSapforForCompilation() throws Exception{
response = new ServerExchangeUnit_2021(ServerCode.OK);
response.object = db.getSapforCopyForCompilation();
}
void UpdateActiveDVMPackages() throws Exception {
response = new ServerExchangeUnit_2021(ServerCode.OK);
Vector<Pair<Integer, Long>> keys_pairs = (Vector<Pair<Integer, Long>>) request.object;

View File

@@ -21,13 +21,16 @@ import TestingSystem.SAPFOR.SapforConfigurationCommand.SapforConfigurationComman
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
import TestingSystem.SAPFOR.SapforPackage.SapforPackageDBTable;
import TestingSystem.SAPFOR.ServerSapfor.ServerSapfor;
import TestingSystem.SAPFOR.ServerSapfor.ServerSapforState;
import TestingSystem.SAPFOR.ServerSapfor.ServerSapforsDBTable;
import Visual_DVM_2021.Passes.All.ZipFolderPass;
import Visual_DVM_2021.Passes.PassCode_2021;
import com.sun.corba.se.spi.activation.Server;
import javafx.util.Pair;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.io.Serializable;
import java.nio.file.Paths;
import java.util.Comparator;
import java.util.LinkedHashMap;
@@ -269,8 +272,16 @@ public class TestsDatabase extends SQLiteDatabase {
ex.printStackTrace();
}
}
res.add(activePackage);
res.add(new DVMPackage(activePackage));
}
return res;
}
public ServerSapfor getSapforCopyForCompilation() {
for (ServerSapfor serverSapfor: serverSapfors.Data.values()){
if (serverSapfor.state.equals(ServerSapforState.Queued)){
return new ServerSapfor(serverSapfor);
}
}
return null;
}
}

View File

@@ -11,14 +11,15 @@ import TestingSystem.SAPFOR.Json.SapforConfiguration_json;
import TestingSystem.SAPFOR.Json.SapforTest_json;
import TestingSystem.SAPFOR.Json.SapforTestingSet_json;
import TestingSystem.SAPFOR.SapforPackage.SapforPackage;
import TestingSystem.SAPFOR.ServerSapfor.ServerSapfor;
import org.apache.commons.io.FileUtils;
import java.io.File;
import java.nio.charset.Charset;
import java.util.Date;
import java.util.Vector;
public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
File workspace;
ServerSapfor sapfor;
@Override
protected ServerCode getActivePackagesCode() {
return ServerCode.GetFirstActiveSapforPackages;
@@ -146,7 +147,14 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
compileSapfors();
super.perform();
}
public void compileSapfors() throws Exception{
public void getServerSapforForCompilation() throws Exception {
sapfor= (ServerSapfor) ServerCommand(ServerCode.GetSapforForCompilation);
}
public void compileSapfors() throws Exception {
sapfor = null;
getServerSapforForCompilation();
if (sapfor != null) {
}
}
}

View File

@@ -1,4 +1,5 @@
package TestingSystem.SAPFOR.ServerSapfor;
import Common.Database.DBObject;
import Common.Database.riDBObject;
import Common.Utils.Utils;
import ProjectData.LanguageName;
@@ -25,6 +26,20 @@ public class ServerSapfor extends riDBObject {
//--
public ServerSapfor() {
}
public ServerSapfor(ServerSapfor s) {
SynchronizeFields(s);
}
@Override
public void SynchronizeFields(DBObject src) {
super.SynchronizeFields(src);
ServerSapfor s = (ServerSapfor) src;
languageName = s.languageName;
home_path = s.home_path;
call_command = s.call_command;
version = s.version;
buildDate = s.buildDate;
state = s.state;
}
@Override
public String toString() {
return call_command;