рефакторинг команд ssh

v++
динамическая смена названия прохода Анализ Кода
This commit is contained in:
2024-04-02 23:35:54 +03:00
parent 95cd91bbca
commit 48f7845564
16 changed files with 96 additions and 87 deletions

View File

@@ -181,10 +181,8 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
}
@Override
protected void PackageStart() throws Exception {
user.connection.ShellCommand("ulimit -s unlimited"); // нужно, для запуска сишной части.
///--
String plannerStartCommand = String.join(" ", "nohup", Utils.DQuotes(getPlanner()), Utils.DQuotes(user.workspace), Utils.DQuotes(packageRemoteWorkspace.full_name), Utils.DQuotes(testingPackage.kernels), Utils.DQuotes(testingPackage.drv), "&");
user.connection.ShellCommand(plannerStartCommand);
user.connection.CommandNoRead("ulimit -s unlimited",plannerStartCommand);
RemoteFile PID = new RemoteFile(packageRemoteWorkspace, "PID");
RemoteFile STARTED = new RemoteFile(packageRemoteWorkspace, "STARTED");
while (!user.connection.Exists(STARTED)) {
@@ -315,7 +313,7 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
@Override
protected void Kill() throws Exception {
if (!testingPackage.PID.isEmpty()) {
user.connection.ShellCommand("kill -9 " + testingPackage.PID);
user.connection.Command("kill -9 " + testingPackage.PID);
}
}
@Override
@@ -335,7 +333,7 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
if (user.connection == null) {
try {
user.connection = new UserConnection(machine, user);
Print("Соединение c " + machine.getURL() + " " + user.login + " успешно установлено.");
// Print("Соединение c " + machine.getURL() + " " + user.login + " успешно установлено.");
} catch (Exception ex) {
Print(ex.toString());
user.connection = null;