Skip to content

Commit

Permalink
Fix file cleanup for console runner
Browse files Browse the repository at this point in the history
  • Loading branch information
bterlson committed Nov 15, 2014
1 parent ba46fc0 commit c5ed940
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions bin/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,18 @@ var Tributary = require('stream-bifurcate')
var scenarios = require('../lib/scenarios');
var readFile = _.wrapCallback(fs.readFile);
var DEFAULT_BATCH_SIZE = 75;

if(args.config) {
require(path.join(process.cwd(), args.config));
}

var t262 = require('../index')
console.log(t262.config);

console.log()

var Runner = loadRunner();
console.log(Runner);

// default to console runner if passing console command
if(args.consoleCommand && args.runner === 'node') {
Expand Down Expand Up @@ -121,6 +132,8 @@ function scenarioStream(test) {

// Load the runner
function loadRunner() {
if(t262.config.runner) return t262.config.runner;

try {
return require('../lib/runners/' + args.runner);
} catch(e) {
Expand Down
2 changes: 1 addition & 1 deletion lib/runners/console.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ ConsoleRunner.prototype.executeBatch = function(batch, batchDone) {
}
})

//fs.unlink(scriptFile);
fs.unlink(scriptFile);
batchDone();
});
}
Expand Down

0 comments on commit c5ed940

Please sign in to comment.