Package org.bladerunnerjs.utility

Examples of org.bladerunnerjs.utility.ProcessLogger$StreamLogger


public class CommandRunnerUtility {
 
  public static void runCommand(BRJS brjs, ProcessBuilder processBuilder) throws CommandOperationException {
    try {
      Process process = processBuilder.start();
      ProcessLogger processLogger = new ProcessLogger(brjs, process, LogLevel.INFO, LogLevel.WARN, null);
      int exitCode = waitForProcess(process, brjs.logger(CommandRunnerUtility.class));
      processLogger.waitFor();
     
      if(exitCode != 0) throw new CommandOperationException("Error while running command '" +
          StringUtils.join(processBuilder.command(), " ") + "' (" + exitCode + ")");
    }
    catch(IOException | InterruptedException e) {
View Full Code Here


        verboseFlag(), browserTimeout(), "INFO");
      logger.debug("Running command: " + CmdCreator.printCmd(args));
      Process process = runTime.exec(args);
      childProcesses.add(process);
     
      ProcessLogger processLogger = new ProcessLogger(brjs, process, LogLevel.WARN, LogLevel.ERROR, null);
      int exitCode = process.waitFor();
      processLogger.waitFor();
     
      if(!childProcesses.remove(process)) {
        logger.error("Failed to remove runTest process from child processes list");
      }
      logger.debug("Exit code is " + exitCode);
View Full Code Here

    String classPath = getClassPath(jsTestDriverJar.getParentFile());
    String[] args = CmdCreator.cmd("java$$-cp$$%s$$com.google.jstestdriver.JsTestDriver --config$$%s$$--port$$%s$$%s$$--browserTimeout$$%s$$--runnerMode$$%s",
      classPath, jsTestDriverJar.getAbsolutePath().replaceAll("\\.jar$", ".conf"), portNumber, verboseFlag(), browserTimeout(), "INFO" );
    logger.debug("Running command: " + CmdCreator.printCmd(args));
    Process process = runTime.exec(args);
    childLoggers.add(new ProcessLogger(brjs, process, LogLevel.INFO, LogLevel.ERROR, "server"));
    childProcesses.add(process);
    waitForServer(0);
  }
View Full Code Here

      logger.debug("Running command: " + CmdCreator.printCmd(args));
      try
      {
        Process process = runTime.exec(args);
        childProcesses.add(process);
        childLoggers.add(new ProcessLogger(brjs, process, LogLevel.DEBUG, LogLevel.INFO, "browser #" + browserNo++));
      }
      catch (IOException e)
      {
        throw new BrowserStartupException(e, args, config.getRelativeDir().getPath());
      }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.utility.ProcessLogger$StreamLogger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.