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());
}