++
исправления планировщика
This commit is contained in:
@@ -3,8 +3,8 @@ import Common.Utils.Vector_;
|
||||
|
||||
import java.util.Vector;
|
||||
public class Constants {
|
||||
public static final int version = 1208;
|
||||
public static final int planner_version = 18;
|
||||
public static final int version = 1209;
|
||||
public static final int planner_version = 20;
|
||||
public static final int testingMaxKernels = 64;
|
||||
//--
|
||||
public static final String ApplicationFileName = "VisualSapfor.jar";
|
||||
@@ -469,7 +469,7 @@ public class Constants {
|
||||
};
|
||||
public static Vector<String> admins_mails = new Vector_<>(
|
||||
"sapfor.tracker@internet.ru",
|
||||
"vmk-post@yandex.ru",
|
||||
"79854210702@ya.ru"
|
||||
"vmk-post@yandex.ru"
|
||||
,"79854210702@ya.ru"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -179,7 +179,6 @@ public abstract class TestingPlanner<P extends TestingPackage> extends TestingCl
|
||||
break;
|
||||
case RunningEnd:
|
||||
DownloadResults();
|
||||
UpdatePackageState(TasksPackageState.Analysis);
|
||||
break;
|
||||
case Paused:
|
||||
if (!checkIfPaused() && CheckNextState())
|
||||
|
||||
@@ -243,6 +243,7 @@ public class RemoteDVMTestingPlanner extends DVMTestingPlanner {
|
||||
switch (testingPackage.state) {
|
||||
case CompilationExecution:
|
||||
case RunningExecution:
|
||||
case Aborted:
|
||||
EmailPackage();
|
||||
break;
|
||||
}
|
||||
@@ -252,20 +253,24 @@ public class RemoteDVMTestingPlanner extends DVMTestingPlanner {
|
||||
@Override
|
||||
protected void DownloadResults() throws Exception {
|
||||
Utils_.CheckDirectory(packageLocalWorkspace);
|
||||
RemoteFile remote_results_archive = new RemoteFile(packageRemoteWorkspace, "results.zip");
|
||||
File results_archive = new File(packageLocalWorkspace, "results.zip");
|
||||
user.connection.performScript(packageRemoteWorkspace, "zip -r " + Utils_.DQuotes("results.zip") + " " + Utils_.DQuotes("results"));
|
||||
//---
|
||||
if (user.connection.Exists(remote_results_archive)) {
|
||||
user.connection.getSingleFile(remote_results_archive.full_name, results_archive.getAbsolutePath());
|
||||
UnzipFolderPass unzipFolderPass = new UnzipFolderPass();
|
||||
unzipFolderPass.Do(results_archive.getAbsolutePath(), packageLocalWorkspace.getAbsolutePath(), false);
|
||||
RemoteFile killedFile = new RemoteFile(packageRemoteWorkspace,"kill");
|
||||
if (user.connection.Exists(killedFile)){
|
||||
UpdatePackageState(TasksPackageState.Aborted);
|
||||
}else {
|
||||
RemoteFile remote_results_archive = new RemoteFile(packageRemoteWorkspace, "results.zip");
|
||||
File results_archive = new File(packageLocalWorkspace, "results.zip");
|
||||
user.connection.performScript(packageRemoteWorkspace, "zip -r " + Utils_.DQuotes("results.zip") + " " + Utils_.DQuotes("results"));
|
||||
//---
|
||||
if (user.connection.Exists(remote_results_archive)) {
|
||||
user.connection.getSingleFile(remote_results_archive.full_name, results_archive.getAbsolutePath());
|
||||
UnzipFolderPass unzipFolderPass = new UnzipFolderPass();
|
||||
unzipFolderPass.Do(results_archive.getAbsolutePath(), packageLocalWorkspace.getAbsolutePath(), false);
|
||||
}
|
||||
UpdatePackageState(TasksPackageState.Analysis);
|
||||
}
|
||||
//---
|
||||
/*
|
||||
if (user.connection.Exists(packageRemoteWorkspace))
|
||||
if (user.connection.Exists(packageRemoteWorkspace))
|
||||
user.connection.RMDIR(packageRemoteWorkspace.full_name);
|
||||
*/
|
||||
}
|
||||
@Override
|
||||
protected void MachineConnectionError() {
|
||||
@@ -274,10 +279,8 @@ public class RemoteDVMTestingPlanner extends DVMTestingPlanner {
|
||||
@Override
|
||||
protected void Kill() throws Exception {
|
||||
if (!testingPackage.PID.isEmpty()) {
|
||||
user.connection.Command("kill -9 " + testingPackage.PID);
|
||||
//очистка после прерывания.
|
||||
// if (user.connection.Exists(packageRemoteWorkspace))
|
||||
// user.connection.RMDIR(packageRemoteWorkspace.full_name);
|
||||
RemoteFile killFile = new RemoteFile(packageRemoteWorkspace, "kill");
|
||||
user.connection.writeToFile("fatality", killFile);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
|
||||
@@ -148,7 +148,7 @@ public class SapforTestingPlanner extends TestingPlanner<SapforPackage> {
|
||||
}
|
||||
@Override
|
||||
protected void DownloadResults() throws Exception {
|
||||
//не требуется.
|
||||
UpdatePackageState(TasksPackageState.Analysis);
|
||||
}
|
||||
@Override
|
||||
protected void AnalyseResults() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user