no message
This commit is contained in:
4
.idea/workspace.xml
generated
4
.idea/workspace.xml
generated
@@ -8,7 +8,9 @@
|
|||||||
<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/GlobalProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/GlobalProperties.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/Repository/Server/ServerCode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Repository/Server/ServerCode.java" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/src/TestingSystem/Common/TestingServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/TestingSystem/Common/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/InstallServerSapfor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Visual_DVM_2021/Passes/All/InstallServerSapfor.java" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
"Mode": "Normal",
|
"Mode": "Normal",
|
||||||
"ServerAddress": "alex-freenas.ddns.net",
|
"ServerAddress": "alex-freenas.ddns.net",
|
||||||
"ServerUserName": "testuser",
|
"ServerUserName": "testuser",
|
||||||
|
"ServerUserSHHPort": 23,
|
||||||
"ComponentsServerPort": 7995,
|
"ComponentsServerPort": 7995,
|
||||||
"TestingServerPort": 7998,
|
"TestingServerPort": 7998,
|
||||||
"SocketTimeout": 5000,
|
"SocketTimeout": 5000,
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ public enum ServerCode {
|
|||||||
CheckURLRegistered,
|
CheckURLRegistered,
|
||||||
DVMConvertProject,
|
DVMConvertProject,
|
||||||
SetRole,
|
SetRole,
|
||||||
InstallSapforForTesting,
|
|
||||||
Patch,
|
Patch,
|
||||||
EmailSapforAssembly,
|
EmailSapforAssembly,
|
||||||
//-
|
//-
|
||||||
@@ -76,5 +75,7 @@ public enum ServerCode {
|
|||||||
SapforPackageNeedsKill,
|
SapforPackageNeedsKill,
|
||||||
UpdateActiveSapforPackages,
|
UpdateActiveSapforPackages,
|
||||||
DownloadDVMPackage,
|
DownloadDVMPackage,
|
||||||
DownloadDVMPackages, DownloadSapforPackage;
|
DownloadDVMPackages,
|
||||||
|
DownloadSapforPackage,
|
||||||
|
InstallServerSapfor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -243,6 +243,10 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
|||||||
Print("Загрузить пакет SAPFOR");
|
Print("Загрузить пакет SAPFOR");
|
||||||
DownloadSapforPackage();
|
DownloadSapforPackage();
|
||||||
break;
|
break;
|
||||||
|
case InstallServerSapfor:
|
||||||
|
Print("Установить текущую версию SAPFOR для тестирования");
|
||||||
|
InstallServerSapfor();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new RepositoryRefuseException("Неподдерживаемый код: " + code);
|
throw new RepositoryRefuseException("Неподдерживаемый код: " + code);
|
||||||
}
|
}
|
||||||
@@ -485,4 +489,30 @@ public class TestingServer extends RepositoryServer<TestsDatabase> {
|
|||||||
else
|
else
|
||||||
throw new RepositoryRefuseException("Не удалось заархивировать пакет тестирования SAPFOR с ключом " + sapforPackage_id);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import Visual_DVM_2021.Passes.Server.TestingSystemPass;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
/*
|
||||||
public class InstallServerSapfor extends ConnectionPass<Object> {
|
public class InstallServerSapfor extends ConnectionPass<Object> {
|
||||||
boolean result;
|
boolean result;
|
||||||
ServerSapfor serverSapfor;
|
ServerSapfor serverSapfor;
|
||||||
@@ -30,6 +31,10 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
|
protected boolean needsAnimation() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
public void Connect() throws Exception {
|
public void Connect() throws Exception {
|
||||||
machine = new Machine("Ubuntu", Global.properties.ServerAddress, Global.properties.ServerUserSHHPort, MachineType.Server);
|
machine = new Machine("Ubuntu", Global.properties.ServerAddress, Global.properties.ServerUserSHHPort, MachineType.Server);
|
||||||
user = new User(Global.properties.ServerUserName, "mprit_2011", "");
|
user = new User(Global.properties.ServerUserName, "mprit_2011", "");
|
||||||
@@ -42,10 +47,7 @@ public class InstallServerSapfor extends ConnectionPass<Object> {
|
|||||||
serverSapfor = null;
|
serverSapfor = null;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@Override
|
|
||||||
protected boolean needsAnimation() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@Override
|
@Override
|
||||||
protected void ServerAction() throws Exception {
|
protected void ServerAction() throws Exception {
|
||||||
RemoteFile testingSystemHome = new RemoteFile(user.connection.sftpChannel.pwd(), "_testing_system", true);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user