Add "jake test" and "jake benchmark"
This commit is contained in:
parent
918dcf6ed2
commit
4e81eb48af
21
Jakefile
21
Jakefile
|
@ -1,5 +1,6 @@
|
||||||
var sys = require("sys");
|
var sys = require("sys");
|
||||||
var fs = require("fs");
|
var fs = require("fs");
|
||||||
|
var childProcess = require("child_process");
|
||||||
|
|
||||||
/* Relative paths are here because of use in |require|. */
|
/* Relative paths are here because of use in |require|. */
|
||||||
var SRC_DIR = "./src";
|
var SRC_DIR = "./src";
|
||||||
|
@ -73,4 +74,20 @@ task("build", [], function() {
|
||||||
fs.writeFileSync(PEGJS_OUT_FILE, preprocess(PEGJS_SRC_FILE), "utf8");
|
fs.writeFileSync(PEGJS_OUT_FILE, preprocess(PEGJS_SRC_FILE), "utf8");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
desc("Run the test suite");
|
||||||
|
task("test", [], function() {
|
||||||
|
var process = childProcess.spawn("test/run", [], { customFds: [0, 1, 2] });
|
||||||
|
process.on("exit", function() { complete(); });
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
desc("Run the benchmark suite");
|
||||||
|
task("benchmark", [], function(runCount) {
|
||||||
|
var process = childProcess.spawn(
|
||||||
|
"benchmark/run",
|
||||||
|
runCount !== undefined ? [runCount] : [],
|
||||||
|
{ customFds: [0, 1, 2] }
|
||||||
|
);
|
||||||
|
process.on("exit", function() { complete(); });
|
||||||
|
}, true);
|
||||||
|
|
||||||
task("default", ["build"], function() {});
|
task("default", ["build"], function() {});
|
||||||
|
|
Loading…
Reference in a new issue