Package org.xmlBlaster.util

Examples of org.xmlBlaster.util.Execute


      String[] commandArr = { pathToCBinary+sep+"TestLeaveServer" };
      String[] envArr = { "" };

      log.info("######## Start test_C_LeaveServer('" + commandArr[0] + "')");

      Execute e = new Execute(commandArr, envArr);
      e.setExecuteListener(this);
      e.run();

      if (e.getExitValue() != 0) {
         fail("C client library test '" + commandArr[0] + "' + failed exit=" + e.getExitValue() + ": " + e.getStderr());
      }

      if (e.getErrorText() != null) {
         fail(e.getErrorText());
      }

      if (e.getStdout().indexOf("[TEST FAIL]") != -1) {
         fail("C client library test '" + commandArr[0] + "' + failed: " + e.getStdout());
      }
      if (e.getStderr().indexOf("[TEST FAIL]") != -1) {
         fail("C client library test '" + commandArr[0] + "' + failed: " + e.getStderr());
      }

      log.info("######## SUCCESS test_C_LeaveServer('" + commandArr[0] + "') exit=" +
               e.getExitValue() + " : " + e.getStdout());
   }
View Full Code Here


      String[] commandArr = { pathToCBinary+sep+"TestSocket" };
      String[] envArr = { "" };

      log.info("######## Start test_C_Socket('" + commandArr[0] + "')");

      Execute e = new Execute(commandArr, envArr);
      e.setExecuteListener(this);
      e.run();

      if (e.getExitValue() != 0) {
         fail("C client library test '" + commandArr[0] + "' + failed exit=" + e.getExitValue() + ": " + e.getStderr());
      }

      if (e.getErrorText() != null) {
         fail(e.getErrorText());
      }

      if (e.getStdout().indexOf("[TEST FAIL]") != -1) {
         fail("C client library test '" + commandArr[0] + "' + failed: " + e.getStdout());
      }
      if (e.getStderr().indexOf("[TEST FAIL]") != -1) {
         fail("C client library test '" + commandArr[0] + "' + failed: " + e.getStderr());
      }

      log.info("######## SUCCESS test_C_Socket('" + commandArr[0] + "') exit=" +
               e.getExitValue() + " : " + e.getStdout());
   }
View Full Code Here

TOP

Related Classes of org.xmlBlaster.util.Execute

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.