Test and benchmark command-line runners can be run from any directory

redux
David Majda 14 years ago
parent aa2327191f
commit 918dcf6ed2

@ -8,7 +8,7 @@ var PEG = require("../lib/peg");
"benchmarks.js",
"runner.js",
].forEach(function(file) {
eval(fs.readFileSync(file, "utf8"));
eval(fs.readFileSync(__dirname + "/" + file, "utf8"));
});
/* Results Table Manipulation */
@ -105,7 +105,7 @@ sys.puts("");
Runner.run(benchmarks, runCount, {
readFile: function(file) {
return fs.readFileSync(file, "utf8");
return fs.readFileSync(__dirname + "/" + file, "utf8");
},
testStart: function(benchmark, test) {

@ -81,7 +81,7 @@ QUnit.done = function(details) {
"passes-test.js",
"compiler-test.js",
].forEach(function(file) {
eval("with (QUnit) {" + fs.readFileSync(file, "utf8") + "}");
eval("with (QUnit) {" + fs.readFileSync(__dirname + "/" + file, "utf8") + "}");
});
QUnit.start();

Loading…
Cancel
Save