test.readObject(in);
// now send a signal indicating we are processing the request
sendSignal(out,ProtocolConstants.RESPONSE_PROCESSING);
// find the exit code, blocking if neccesary
ExecProcess proc = null;
boolean wasRun = false;
for (int i = 0; i < processPool.size(); i++) {
try {
proc = (ExecProcess)processPool.get(i);
}
catch (java.lang.NoSuchMethodError ex) {
// does not exist in jdk1.1.x
proc = (ExecProcess)processPool.elementAt(i);
}
// check for any instance of test running with the same name
if (proc.getTestObject().getTestID().equals(test.getTestID())) {
wasRun = true;
ConsoleServer.debugMsg("Process Id was found :"+test.getTestID(),9);
break;
}
}
if (!wasRun) {
// the process was never started, so assume it failed
ConsoleServer.debugMsg("Process was not found :"+test.getTestID(),4);
sendSignal(out,ProtocolConstants.RESPONSE_FINISHED_ERROR);
}
else {
ConsoleServer.debugMsg("Sending trace file paths",9);
ConsoleServer.debugMsg("Env file :"+proc.getTestObject().getEnvFileName().toString(),9);
ConsoleServer.debugMsg("StdOut file :"+proc.getTestObject().getStdOutFileName().toString(),9);
ConsoleServer.debugMsg("StdErr file :"+proc.getTestObject().getStdErrFileName().toString(),9);
// now send a signal indicating we have finished
sendSignal(out,ProtocolConstants.RESPONSE_FINISHED_OK);
// ---- send the env, stdout and stderr file names --------------------
out.writeUTF(proc.getTestObject().getEnvFileName().toString());
out.flush();
out.writeUTF(proc.getTestObject().getStdOutFileName().toString());
out.flush();
out.writeUTF(proc.getTestObject().getStdErrFileName().toString());
out.flush();
// ----------------------------------
sendSignal(out,ProtocolConstants.RESPONSE_FINISHED_OK);
}
}