Esempio n. 1
0
 public JormungandSubProcess waitFor(Long processID) {
   JormungandSubProcess process = getProcess(processID);
   while (!process.isFinished()) {
     try {
       Thread.sleep(100);
     } catch (InterruptedException e) {
       core.logException(e);
     }
   }
   return process;
 }
Esempio n. 2
0
  @Override
  public boolean executeTests() {
    Long pid = prepareExecution("ls", "-l");

    scheduleExecution(pid);

    JormungandSubProcess process = waitFor(pid);

    Integer retVal = process.getReturnCode();

    if (retVal > 0) {
      core.logWarning("EXIT_CODE: " + retVal);
      for (String line : process.getProcessOutput()) {
        core.logWarning("OUT: " + line);
      }
    }

    return retVal == 0;
  }