private int execute(File dir, String[] files, PrintStream out, String host, String port, String user, String password) {
int okCount;
int i;
String file;
TProcessors tp;
boolean ok;
okCount = 0;
for (i = 0; i < files.length; i++) {
try {
tp = new TProcessors(config, host, port, user, password, urlEncoding, tracingRequest, createProperties());
} catch (JDOMException e) {
throw new BuildException("initializing tprocessor failed", e);
} catch (IOException e) {
throw new BuildException("initializing tprocessor failed", e);
}
file = files[i];
log((i + 1) + "/" + files.length + ": " + file);
try {
ok = tp.executeTestCase(new File(dir, file), out);
} catch (Exception e) {
throw new BuildException("execution failed: " + file, e);
}
if (ok) {
okCount++;