Browse Source

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

redux
David Majda 11 years ago
parent
commit
918dcf6ed2
  1. 4
      benchmark/run
  2. 2
      test/run

4
benchmark/run

@ -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) {

2
test/run

@ -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