no message
This commit is contained in:
@@ -22,6 +22,11 @@ public class DVMPackage extends TestingPackage {
|
||||
//---
|
||||
@Description("IGNORE")
|
||||
public DVMPackage_json package_json = null;
|
||||
public DVMPackage(){}
|
||||
public DVMPackage(DVMPackage p) {
|
||||
super(p);
|
||||
this.SynchronizeFields(p);
|
||||
}
|
||||
//---
|
||||
@Override
|
||||
public void destructor() {
|
||||
|
||||
@@ -177,14 +177,14 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
||||
LinkedHashMap<Integer, File> tests = getTestsFromJson();
|
||||
//синхронизировать их.
|
||||
for (int test_id : tests.keySet()) {
|
||||
// Print("testId="+test_id);
|
||||
// Print("testId="+test_id);
|
||||
File test = tests.get(test_id);
|
||||
RemoteFile test_dst = new RemoteFile(testingPackage.user_workspace + "/projects/" + test_id, true);
|
||||
// Print("src="+test.getAbsolutePath());
|
||||
// Print("dst="+test_dst.full_name);
|
||||
// Print("src="+test.getAbsolutePath());
|
||||
// Print("dst="+test_dst.full_name);
|
||||
user.connection.MKDIR(test_dst);
|
||||
user.connection.SynchronizeSubDirsR(test, test_dst);
|
||||
// Print("done");
|
||||
// Print("done");
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@@ -236,6 +236,22 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
||||
}
|
||||
@Override
|
||||
protected boolean CheckNextState() throws Exception {
|
||||
boolean progress_changed = false;
|
||||
boolean state_changed = false;
|
||||
|
||||
RemoteFile progress = new RemoteFile(packageRemoteWorkspace, "progress");
|
||||
if (user.connection.Exists(progress)) {
|
||||
String s = user.connection.readFromFile(progress).replace("\r", "").replace("\n", "");
|
||||
int current_progress = Integer.parseInt(s);
|
||||
System.out.println("current_progress="+current_progress);
|
||||
System.out.println("old_progress="+testingPackage.progress);
|
||||
/*
|
||||
if (current_progress != testingPackage.progress) {
|
||||
testingPackage.progress = current_progress;
|
||||
progress_changed = true;
|
||||
}
|
||||
*/
|
||||
}
|
||||
RemoteFile stateDir = new RemoteFile(packageRemoteWorkspace, "state");
|
||||
//состояния пакета могут меняться только по возрастанию. ищем, появилось ли такое.
|
||||
Vector<TasksPackageState> higherStates = testingPackage.state.getHigherStates();
|
||||
@@ -245,10 +261,11 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
||||
if (user.connection.Exists(file)) {
|
||||
Print("found new state: " + file.name);
|
||||
testingPackage.state = state;
|
||||
return true;
|
||||
state_changed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return progress_changed || state_changed;
|
||||
}
|
||||
@Override
|
||||
protected void DownloadResults() throws Exception {
|
||||
@@ -330,9 +347,9 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
||||
}
|
||||
}
|
||||
}
|
||||
testingPackage.progress = 100;
|
||||
testingPackage.saveJson(); //запись обновленных результатов пакета в json!
|
||||
Print("analysis done, ct_count=" + ct_count + " rt count=" + rt_count);
|
||||
//--
|
||||
}
|
||||
@Override
|
||||
protected void Kill() throws Exception {
|
||||
@@ -354,7 +371,7 @@ public class DVMTestingPlanner extends TestingPlanner<DVMPackage> {
|
||||
packageRemoteWorkspace = new RemoteFile(user.workspace + "/tests", String.valueOf(testingPackage.id), true);
|
||||
packageLocalWorkspace = new File(Global.PackagesDirectory, String.valueOf(testingPackage.id));
|
||||
//-
|
||||
Print("packageremoteWorkspace="+Utils.Brackets(packageRemoteWorkspace.full_name));
|
||||
Print("packageremoteWorkspace=" + Utils.Brackets(packageRemoteWorkspace.full_name));
|
||||
}
|
||||
@Override
|
||||
protected boolean Connect() {
|
||||
|
||||
Reference in New Issue
Block a user