提交 803d227b authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 be7d675f
......@@ -162,6 +162,8 @@ java org.h2.test.TestAll timer
improve javadocs
write complete page right after checkpoint
upload jazoon
test case for out of memory (try to corrupt the database using out of memory)
......
......@@ -32,16 +32,24 @@ public class Build extends BuildBase {
download("ext/derby-10.4.1.3.jar",
"http://repo1.maven.org/maven2/org/apache/derby/derby/10.4.1.3/derby-10.4.1.3.jar",
"01c19aaea2e971203f410c5263214a890f340342");
download("ext/postgresql-8.3-603.jdbc4.jar",
"http://repo1.maven.org/maven2/postgresql/postgresql/8.3-603.jdbc4/postgresql-8.3-603.jdbc4.jar",
"c1545d956cc2013e8623f7cbc4de320be80ac646");
download("ext/derbyclient-10.4.1.3.jar",
"http://repo1.maven.org/maven2/org/apache/derby/derbyclient/10.4.1.3/derbyclient-10.4.1.3.jar",
"14e97efccae4d622dfcc65bf1f042588c7bd4cb3");
download("ext/derbynet-10.4.1.3.jar",
"http://repo1.maven.org/maven2/org/apache/derby/derbynet/10.4.1.3/derbynet-10.4.1.3.jar",
"cdf87901e6dfa25c7bc7fa509731bbca04b46191");
download("ext/postgresql-8.3-603.jdbc3.jar",
"http://repo1.maven.org/maven2/postgresql/postgresql/8.3-603.jdbc3/postgresql-8.3-603.jdbc3.jar",
"33d531c3c53055ddcbea3d88bfa093466ffef924");
download("ext/mysql-connector-java-5.1.6.jar",
"http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar",
"380ef5226de2c85ff3b38cbfefeea881c5fce09d");
String cp = "bin" + File.pathSeparator + "bin/h2.jar" + File.pathSeparator +
"ext/hsqldb-1.8.0.7.jar" + File.pathSeparator +
"ext/derby-10.4.1.3.jar" + File.pathSeparator +
"ext/postgresql-8.3-603.jdbc4.jar" + File.pathSeparator +
"ext/derbyclient-10.4.1.3.jar" + File.pathSeparator +
"ext/derbynet-10.4.1.3.jar" + File.pathSeparator +
"ext/postgresql-8.3-603.jdbc3.jar" + File.pathSeparator +
"ext/mysql-connector-java-5.1.6.jar";
exec("java", new String[]{"-Xmx128m", "-cp", cp, "org.h2.test.bench.TestPerformance", "-init", "-db", "1"});
exec("java", new String[]{"-Xmx128m", "-cp", cp, "org.h2.test.bench.TestPerformance", "-db", "2"});
......
......@@ -175,15 +175,14 @@ public class BuildBase {
out.print(" " + args[i]);
}
out.println();
Process p;
String[] cmdArray = new String[1 + (args == null ? 0 : args.length)];
cmdArray[0] = command;
if (args != null) {
System.arraycopy(args, 0, cmdArray, 1, args.length);
}
p = Runtime.getRuntime().exec(cmdArray);
copy(p.getInputStream(), out);
copy(p.getErrorStream(), out);
Process p = Runtime.getRuntime().exec(cmdArray);
copyInThread(p.getInputStream(), out);
copyInThread(p.getErrorStream(), out);
p.waitFor();
return p.exitValue();
} catch (Exception e) {
......@@ -191,7 +190,10 @@ public class BuildBase {
}
}
private void copy(InputStream in, OutputStream out) throws IOException {
private void copyInThread(final InputStream in, final OutputStream out) {
new Thread() {
public void run() {
try {
while (true) {
int x = in.read();
if (x < 0) {
......@@ -199,6 +201,11 @@ public class BuildBase {
}
out.write(x);
}
} catch (Exception e) {
throw new Error("Error: " + e, e);
}
}
} .start();
}
/**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论