no message

This commit is contained in:
2024-02-19 23:49:35 +03:00
parent 11f82d2bb9
commit 6a7feb96e7
5 changed files with 67 additions and 7 deletions

View File

@@ -53,7 +53,6 @@ public enum ServerCode {
CheckURLRegistered,
DVMConvertProject,
SetRole,
InstallSapforForTesting,
Patch,
EmailSapforAssembly,
//-
@@ -76,5 +75,7 @@ public enum ServerCode {
SapforPackageNeedsKill,
UpdateActiveSapforPackages,
DownloadDVMPackage,
DownloadDVMPackages, DownloadSapforPackage;
DownloadDVMPackages,
DownloadSapforPackage,
InstallServerSapfor;
}

View File

@@ -243,6 +243,10 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
Print("Загрузить пакет SAPFOR");
DownloadSapforPackage();
break;
case InstallServerSapfor:
Print("Установить текущую версию SAPFOR для тестирования");
InstallServerSapfor();
break;
default:
throw new RepositoryRefuseException("Неподдерживаемый код: " + code);
}
@@ -485,4 +489,30 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
else
throw new RepositoryRefuseException("Не удалось заархивировать пакет тестирования SAPFOR с ключом " + sapforPackage_id);
}
private void InstallServerSapfor() throws Exception {
File testingSystemHome = new File(Global.Home);
File repo = new File(testingSystemHome, "Repo");
File repoSapforHome = Paths.get(repo.getAbsolutePath(), Constants.SAPFOR_REPOSITORY_BIN ).toFile();
File repo_bin = new File(repoSapforHome, "Sapfor_F");
//--
Utils.startScript(repo, repo, "dvm_checkout",
"svn checkout " +
Constants.REPOSITORY_AUTHENTICATION +
" " + Constants.DVM_REPOSITORY + " 1>dvm_out.txt 2>dvm_err.txt\n").waitFor();
Utils.startScript(repo, repo, "spf_checkout",
"svn checkout " +
Constants.REPOSITORY_AUTHENTICATION +
" " + Constants.SAPFOR_REPOSITORY + " 1>spf_out.txt 2>spf_err.txt\n").waitFor();
//--
if (repo_bin.exists()){
FileUtils.forceDelete(repo_bin);
}
//--
Utils.startScript(repoSapforHome, repoSapforHome, "build_sapfor",
"cmake ../ 1>out.txt 2>err.txt\nmake -j 14 1>>out.txt 2>>err.txt\n").waitFor();
//--
response = new ServerExchangeUnit_2021(ServerCode.OK);
}
}

View File

@@ -17,6 +17,7 @@ import Visual_DVM_2021.Passes.Server.TestingSystemPass;
import java.util.Date;
import java.util.Vector;
/*
public class InstallServerSapfor extends ConnectionPass<Object> {
boolean result;
ServerSapfor serverSapfor;
@@ -28,6 +29,10 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
@Override
public String getButtonText() {
return "";
}
@Override
protected boolean needsAnimation() {
return true;
}
@Override
public void Connect() throws Exception {
@@ -42,10 +47,7 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
serverSapfor = null;
return true;
}
@Override
protected boolean needsAnimation() {
return true;
}
@Override
protected void ServerAction() throws Exception {
RemoteFile testingSystemHome = new RemoteFile(user.connection.sftpChannel.pwd(), "_testing_system", true);
@@ -127,3 +129,27 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
}
}
*/
public class InstallServerSapfor extends TestingSystemPass{
@Override
public String getIconPath() {
return "/icons/DownloadAll.png";
}
@Override
public String getButtonText() {
return "";
}
@Override
protected boolean needsAnimation() {
return true;
}
@Override
protected int getTimeout() {
return 0;
}
@Override
protected void ServerAction() throws Exception {
Command(new ServerExchangeUnit_2021(ServerCode.InstallServerSapfor));
System.out.println(response.object);
}
}